comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Need of help Leonid(dulman@ibm.net)
Date: 1997/02/17
Date: 1997-02-17T00:00:00+00:00	[thread overview]
Message-ID: <dewar.856199272@merv> (raw)
In-Reply-To: E5MBIp.Ix0@thomsoft.com


Rex said

<<An interesting problem occurred while trying to provide the
utility functions.  I had the following function:

function V_String_Of( Standard_String : in   String )
         return                            V_String is
begin

   -- Test omitted for Strings that are too large to fit.

   return ( Size => Standard_String'Length ,
            S    => Standard_String        ) ;

end V_String_Of ;


I liked this code because it did not require creating a
temporary variable on the stack, particularly if the string
was very large.  However, it failed whenever a substring
was passed which had a starting index other than 1:>>


What makes you think that this code will not require a temporary variable
on the stack? Just because you don't see it in the source, does not mean
it is not there. Of course compilers will differ. To see what GNAT is
doing, use the -gnatdg switch, which shows the expanded source.





      reply	other threads:[~1997-02-17  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-02-08  0:00 Need of help Leonid(dulman@ibm.net) dulman
1997-02-08  0:00 ` Robert Dewar
1997-02-10  0:00   ` Thomas Hoffmann
1997-02-10  0:00     ` Robert Dewar
     [not found]       ` <5dpftl$qi@fozzie.sun3.iaf.nl>
1997-02-12  0:00         ` Robert Dewar
1997-02-13  0:00           ` Keith Thompson
1997-02-12  0:00     ` Rex Reges
1997-02-15  0:00       ` Keith Thompson
1997-02-17  0:00         ` Robert Dewar [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox