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,90f687f65a66617e X-Google-Attributes: gid103376,public From: kst@sd.aonix.com (Keith Thompson) Subject: Re: Simple ADA/C Question Date: 1997/02/28 Message-ID: #1/1 X-Deja-AN: 222162672 Sender: news@thomsoft.com (USENET News Admin @flash) X-Nntp-Posting-Host: pulsar References: <01bc23b2$ecc64960$64e2b8cd@p5120.bda> Organization: Aonix, San Diego, CA, USA Newsgroups: comp.lang.ada Originator: kst@pulsar Date: 1997-02-28T00:00:00+00:00 List-Id: In dewar@merv.cs.nyu.edu (Robert Dewar) writes: [...] > I have no idea what BOb is thinking of here. It is perfectly fine to > call a C function that returns an int, with the Ada function having > a return type of (type Myint is new Integer), if the representation of > int and Integer are the same, as is always true of GNAT, and likely > true of most other Ada 95 compilers. If you have a C function that returns an int, the corresponding Ada function's return type should be Interfaces.C.int. Yes, C's int and Ada's Integer are usually the same size, but why take chances when the language provides a type that's *guaranteed* to have the same representation? -- Keith Thompson (The_Other_Keith) kst@sd.aonix.com <*> TeleSo^H^H^H^H^H^H Alsy^H^H^H^H Thomson Softw^H^H^H^H^H^H^H^H^H^H^H^H^H Aonix 10251 Vista Sorrento Parkway, Suite 300, San Diego, CA, USA, 92121-2706 "Humor is such a subjective thing." -- Cartagia