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,a13657a6f67ac494 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-02-13 13:36:47 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Simple library functions Date: Fri, 13 Feb 2004 15:36:01 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <102qgre7ol2mo85@corp.supernews.com> References: <19401efb.0402121137.2a20b681@posting.google.com> <19401efb.0402122318.68154453@posting.google.com> <19401efb.0402130454.2779b091@posting.google.com> X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:5551 Date: 2004-02-13T15:36:01-06:00 List-Id: "Harald Korneliussen" 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.