comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Simple library functions
Date: Fri, 13 Feb 2004 15:36:01 -0600
Date: 2004-02-13T15:36:01-06:00	[thread overview]
Message-ID: <102qgre7ol2mo85@corp.supernews.com> (raw)
In-Reply-To: 19401efb.0402130454.2779b091@posting.google.com

"Harald Korneliussen" <scallassig@mailexpire.com> wrote in message
news:19401efb.0402130454.2779b091@posting.google.com...
...
> Apropos that: when I looked at gnat's regexp package I saw a comment
> about certain functions being evaluated twice, once to determine the
> size and another time to actually produce the results. Have I
> understood correctly that in for instance
>
> s : String := function_returning_a_string_of_variable_length(junk :
> Integer);
>
> the function is actually evaluated twice?

No, the function is evaluated only once. The compiler has to return the
string and the bounds from the function at one time. Dunno what's going on
in GNAT's libraries.

                      Randy.






  reply	other threads:[~2004-02-13 21:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-12 19:37 Simple library functions Harald Korneliussen
2004-02-12 19:50 ` Ed Falis
2004-02-12 19:54 ` Ed Falis
2004-02-12 20:54 ` Ludovic Brenta
2004-02-13  0:52 ` Jeffrey Carter
2004-02-13  7:18   ` Harald Korneliussen
2004-02-13 12:54     ` Harald Korneliussen
2004-02-13 21:36       ` Randy Brukardt [this message]
2004-02-13 21:55     ` Pascal Obry
2004-02-14 16:14       ` Harald Korneliussen
2004-02-13  1:21 ` Stephen Leake
replies disabled

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