From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,177ff20edf7f64cf X-Google-Attributes: gid103376,public From: kst@thomsoft.com (Keith Thompson) Subject: Re: Unconstrained array aggregation..sq. peg into round hole? Date: 1996/03/20 Message-ID: #1/1 X-Deja-AN: 143439564 sender: news@thomsoft.com (USENET News Admin @flash) x-nntp-posting-host: pulsar references: <4ihrvo$hs5@dfw.dfw.net> organization: Thomson Software Products, San Diego, CA, USA newsgroups: comp.lang.ada originator: kst@pulsar Date: 1996-03-20T00:00:00+00:00 List-Id: In bobduff@world.std.com (Robert A Duff) writes: [...] > > In Ada there is a difference between Table(2)(3) and Table(2,3), in > >C there isn't. > > Right. Um, not quite. In C, if Table is declared as a two-dimensional array, then Table[2][3] is a single element of that array. C's syntax doesn't allow more than one index expression between a pair of brackets. The expression Table[2,3] is syntactically legal, but the expression between the brackets includes a comma operator, so it's equivalent to Table[3] I *think* that gives you a one-dimensional array, the fourth (zero-based arrays, remember?) row of Table, which in most expression contexts becomes a pointer to the first element of that row. -- Keith Thompson (The_Other_Keith) kst@thomsoft.com TeleSoft^H^H^H^H^H^H^H^H Alsys^H^H^H^H^H Thomson Software Products 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2718 This sig uses the word "Exon" in violation of the Communications Decency Act.