From: dewarr@my-dejanews.com
Subject: Re: Reading environment variables in ADA?
Date: 1998/10/06
Date: 1998-10-06T00:00:00+00:00 [thread overview]
Message-ID: <6vdgvv$2h3$1@nnrp1.dejanews.com> (raw)
In-Reply-To: m34stiyb9n.fsf@mheaney.ni.net
In article <m34stiyb9n.fsf@mheaney.ni.net>,
Matthew Heaney <matthew_heaney@acm.org> 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
next prev parent reply other threads:[~1998-10-06 0:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-09-12 0:00 Reading environment variables in ADA? Stefan Lingdell
1998-09-12 0:00 ` David C. Hoos, Sr
1998-09-13 0:00 ` Steven Hovater
1998-09-17 0:00 ` Matthew Heaney
1998-09-17 0:00 ` Gisle S{lensminde
1998-10-06 0:00 ` Matthew Heaney
1998-10-06 0:00 ` dewarr [this message]
1998-10-06 0:00 ` Robert I. Eachus
1998-10-07 0:00 ` dewarr
1998-10-07 0:00 ` Robert I. Eachus
1998-10-13 0:00 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox