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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,13b19740d69cbdc2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-13 02:40:41 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!news-out1.nntp.be!propagator2-sterling!news-in-sterling.nuthinbutnews.com!cyclone1.gnilink.net!spamkiller2.gnilink.net!nwrdny01.gnilink.net.POSTED!53ab2750!not-for-mail From: "Stephane Richard" Newsgroups: comp.lang.ada References: <20031010074015.761204C40C1@lovelace.ada-france.org> <94skovca8efqisiip65q37of63g28n1284@4ax.com> Subject: Re: Modes (was unbounded_string) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: Date: Mon, 13 Oct 2003 09:40:39 GMT NNTP-Posting-Host: 141.149.78.169 X-Complaints-To: abuse@verizon.net X-Trace: nwrdny01.gnilink.net 1066038039 141.149.78.169 (Mon, 13 Oct 2003 05:40:39 EDT) NNTP-Posting-Date: Mon, 13 Oct 2003 05:40:39 EDT Xref: archiver1.google.com comp.lang.ada:771 Date: 2003-10-13T09:40:39+00:00 List-Id: "Dmitry A. Kazakov" wrote in message news:94skovca8efqisiip65q37of63g28n1284@4ax.com... > On Fri, 10 Oct 2003 19:06:00 GMT, Jeffrey Carter > wrote: > > >Since GNAT.OS_Lib.Getenv returns type String_Access, you have to use > >String_Access if you want to use Getenv. But note the description of > >Getenv from GNAT.OS_Lib: > > > >-- Get the value of the environment variable. Returns an access > >-- to the empty string if the environment variable does not exist > >-- or has an explicit null value (in some operating systems these > >-- are distinct cases, in others they are not; this interface > >-- abstracts away that difference. The argument is allocated on > >-- the heap (even in the null case), and needs to be freed explicitly > >-- when no longer needed to avoid memory leaks. > > Awful, I didn't expected that from ACT. The design above is definitely > not Ada's idiom. > > --- > Regards, > Dmitry Kazakov > www.dmitry-kazakov.de Perhaps as in many OS it's the only way as the OS (probably written in C or some other language simply returns it this way? -- St�phane Richard "Ada World" Webmaster http://www.adaworld.com