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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,25b9eb5c3a89bced X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns13feed!worldnet.att.net!24.30.200.11!news-east.rr.com!news-feed-01.rdc-kc.rr.com!news.rr.com!cyclone2.kc.rr.com!news2.kc.rr.com!tornado.socal.rr.com.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada Subject: Re: where exactly c++,c fail and Ada gets thru' References: <1145852356.559455.222600@i39g2000cwa.googlegroups.com> <1145855124.720029.35280@t31g2000cwb.googlegroups.com> <11708614.Atp6ZMqtRP@linux1.krischik.com> From: Keith Thompson Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:/MVU4SXc6zynhgapMm/5AsKhkAg= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 26 Apr 2006 19:33:40 GMT NNTP-Posting-Host: 66.75.136.120 X-Complaints-To: abuse@rr.com X-Trace: tornado.socal.rr.com 1146080020 66.75.136.120 (Wed, 26 Apr 2006 12:33:40 PDT) NNTP-Posting-Date: Wed, 26 Apr 2006 12:33:40 PDT Organization: Road Runner High Speed Online http://www.rr.com Xref: g2news2.google.com comp.lang.ada:3939 Date: 2006-04-26T19:33:40+00:00 List-Id: Martin Krischik writes: > Keith Thompson wrote: >> In fact, it's not possible in C to pass an array directly as a >> function parameter. > > Actually C99 can pass arrays. The declaration looks something like this: > > F (int A_Lenght, double A [A_Lenght]) > > or > > G (double A [static 10]) > > or even > > H (double A [*]) > > But then: AFAIK: there is only one compiler which prides itself with > actually implementing C99 arrays and one compiler which at least tries and > and has the failures on it's bug list. I'm fairly sure that still passes a pointer, not the actual array. For example, the expression "sizeof(A)" inside the function will yield the size of a pointer, not the size of the array. -- Keith Thompson (The_Other_Keith) kst-u@mib.org San Diego Supercomputer Center <*> We must do something. This is something. Therefore, we must do this.