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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5a84d5077c54a29d X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!m3g2000hsc.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: Ada array vs C pointer (call by reference) Date: Fri, 27 Jun 2008 06:02:49 -0700 (PDT) Organization: http://groups.google.com Message-ID: <5df91e99-a972-48f7-b466-3eb05dc0a915@m3g2000hsc.googlegroups.com> References: NNTP-Posting-Host: 128.141.45.248 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1214571770 30529 127.0.0.1 (27 Jun 2008 13:02:50 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 27 Jun 2008 13:02:50 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: m3g2000hsc.googlegroups.com; posting-host=128.141.45.248; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:907 Date: 2008-06-27T06:02:49-07:00 List-Id: On 27 Cze, 04:55, Adam Beneschan wrote: > Oh, and you probably want to use Interfaces.C.C_Float instead of the > Ada type "Float", to ensure that you're using the same kind of float > that the C routine expects. Don't get me wrong, but I find it a bit of handwaving. Ada *cannot* guarantee that Interfaces.C.C_Float is the *right* float, because it does not verify how the C code was compiled and there is a lot of freedom given to C implementers in this area. Same for all other types. In reality we have to rely on some external knowledge about the implementation - but then, Interfaces.C.XXX have little added value, because we might as well have the same knowledge about types from Standard. Is there any implementation where Interfaces.C.int has different properties than Integer? -- Maciej Sobczak * www.msobczak.com * www.inspirel.com