Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!hplabs!hp-pcd!hpcvca!charles From: charles@hpcvca.CV.HP.COM (Charles Brown) Newsgroups: comp.sys.amiga.tech Subject: Re: Modula-2 and C initializations Message-ID: <1410021@hpcvca.CV.HP.COM> Date: 5 Jul 89 23:50:21 GMT References: <7203@cbmvax.UUCP> Organization: Hewlett-Packard Co., Corvallis, Oregon Lines: 31 > BTW, the construct: > int a[] = {1, 2, 3}; > usually doesn't create any code (unless the intialization is allowed for > autovariables). Instead it merely places the values into the > initialized data segment instead of zeros. > whereas the equivalent M2 code: > a : array [0..2] of integer; > a[0] := 1; a[1] := 2; a[2] := 3; Pphhttt!!! This is not equivalent code. The equivalent code in C is: int a[3]; a[0] = 1; a[1] = 2; a[2] = 3; So for this example C is capable of doing exactly what M2 is doing, but M2 is not able to do what C is capable of. > Note that this does not prove one superior over the other. They are > different, and have different strengths and weaknesses. ... THIS example in fact DOES show one superiority of C. > Ah well, I said that I didn't want to get involved in a "Language X is better > that language Y" discussion, and here I am starting to think about it. *grin* > Kevin Klop {uunet|rutgers|amiga}!cbmvax!kevin You chose a poor example to avoid THAT arguement. -- Charles Brown charles@cv.hp.com or charles%hpcvca@hplabs.hp.com or hplabs!hpcvca!charles or "Hey you!" Not representing my employer. "The guy sure looks like plant food to me." Little Shop of Horror