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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ebb3574ca8067275 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-28 10:37:00 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!noc.near.net!inmet!asp!mg From: mg@asp.camb.inmet.com (Mitch Gart) Subject: Re: Access type representations. Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. X-Newsreader: TIN [version 1.1 PL8] References: <9410281131.AA15384@eurocontrol.de> Date: Fri, 28 Oct 1994 17:03:12 GMT Date: 1994-10-28T17:03:12+00:00 List-Id: Bob Wells #402 (wel@EUROCONTROL.DE) wrote: I have heard of compilers where an object of type "access string" points to the string descriptor, rather than to the first character of the string. Then the contents of the string are reachable from the descriptor, either by being right next to the descriptor in memory or through another level of indirection. So I'm not sure what the answer would be to this question: : Getting back to that thread of using access types to interface with : pointers in C, David emery said that my assumption that the access : type in Ada does not necessarily have to contain the address. In this case, - yes, the Ada access object is a 32-bit address of a part of the object, like a C pointer, but - no, the Ada access object doesn't contain the address of the first character of the string like the C pointer. If you want to pass the address of an Ada string to a C function, func(s(s'first)'address) should work for all compilers. Mitch Gart