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!c58g2000hsc.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 13:35:46 -0700 (PDT) Organization: http://groups.google.com Message-ID: <873f013b-c7eb-4cab-ade7-7b31503baa8b@c58g2000hsc.googlegroups.com> References: <5df91e99-a972-48f7-b466-3eb05dc0a915@m3g2000hsc.googlegroups.com> <4864fc92$0$6617$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: 85.3.103.34 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1214598947 14531 127.0.0.1 (27 Jun 2008 20:35:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 27 Jun 2008 20:35:47 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: c58g2000hsc.googlegroups.com; posting-host=85.3.103.34; 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:920 Date: 2008-06-27T13:35:46-07:00 List-Id: On 27 Cze, 16:43, Georg Bauhaus wrote: > > Is there any implementation where Interfaces.C.int has different > > properties than Integer? > > Try this with yours :-) > > with Interfaces.C; > > procedure Cint is > use Interfaces; > use type C.int; > > X: C.int; > begin > X := C.int'last; > X := X + 1; > end; CONSTRAINT_ERROR - overflow check failed. I get the same with Integer. What is the difference then? And even assuming that on *your* implementation it is different - how does it influence the interfacing with C? It does not, because interfacing is about data transfer, not about arithmetics. -- Maciej Sobczak * www.msobczak.com * www.inspirel.com