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,ed86965848f8610b X-Google-Attributes: gid103376,public From: dewarr@my-dejanews.com Subject: Re: Reading environment variables in ADA? Date: 1998/10/06 Message-ID: <6vdgvv$2h3$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 398296893 References: <6tdl75$qs6$2@nyheter.chalmers.se> X-Http-Proxy: 1.0 x13.dejanews.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Tue Oct 06 16:37:19 1998 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/2.02 (OS/2; I) Date: 1998-10-06T00:00:00+00:00 List-Id: In article , Matthew Heaney wrote: > gisle@krake.ii.uib.no (Gisle S{lensminde) writes: > > > Var_Name := Cstr.New_String("HOME"); > > Please do not this, as this solution uses heap unnecessarily. You only > need to declare an aliased string object on the stack. Note that if you declare a *constant* aliased string, then a good compiler should not even allocate stack space, but instead allocate the constant statically. This is what GNAT does, and I believe that at least some other Ada compilers do this same optimization. -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own