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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,13b19740d69cbdc2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-13 02:33:31 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Modes (was unbounded_string) Date: Mon, 13 Oct 2003 11:33:48 +0200 Message-ID: <94skovca8efqisiip65q37of63g28n1284@4ax.com> References: <20031010074015.761204C40C1@lovelace.ada-france.org> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1066037609 22085138 212.79.194.111 (16 [77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:769 Date: 2003-10-13T11:33:48+02:00 List-Id: 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