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.2 required=5.0 tests=BAYES_00,FROM_NUMERIC_TLD, INVALID_MSGID,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a7d2d00671375b58 X-Google-Attributes: gid103376,public From: steved@pacifier.com@199.2.117.163 (Steve Doiel) Subject: Re: GNAT Strings Date: 1996/04/18 Message-ID: <4l4d3c$4vo@news.pacifier.com>#1/1 X-Deja-AN: 148102096 references: <4l0oiq$4e8@arl-news-svc-2.compuserve.com> organization: Pacifier BBS, Vancouver, Wa. ((360) 693-0325) reply-to: steved@pacifier.com (Steve Doiel) newsgroups: comp.lang.ada Date: 1996-04-18T00:00:00+00:00 List-Id: In <4l0oiq$4e8@arl-news-svc-2.compuserve.com>, 100331.2264@compuserve.com (R.J. Kirkbride) writes: >Does anyone know how strings are stored in GNAT, >and thus how they can be sent from C. > >I think a pointer is first sent to the string and then >a pointer to a structure containing first and last pointers >but I am not absolutely sure this is correct. > >Any help would be much appreciated, > >Rob. > Look to the package "Interfaces.c" in the file i-c.ads and you will find a function: function To_Ada (Item : in char_array; Trim_Nul : in Boolean := True) return String; This is probably the ticket you're looking for.