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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Troubles with C strings Date: Sat, 26 Jul 2014 21:41:39 +0300 Organization: Tidorum Ltd Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net c6wP+0IH8jFLRPqIWt0STQEdYUai83qnYas8eDusTgXrXnTQTR Cancel-Lock: sha1:rkHFS8yHVHh0SLAYlr96xzi3C94= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:21257 Date: 2014-07-26T21:41:39+03:00 List-Id: On 14-07-26 17:13 , Victor Porton wrote: > RM2012 B.3.1: > > 39 function Value (Item : in chars_ptr; Length : in size_t) > return String; > 40/1 Equivalent to To_Ada(Value(Item, Length) & nul, Trim_Nul=>True). > > Isn't the function Value improperly recursively defined through itself?! No, the definition uses another Value function. > Please explain. The call in 40/1 uses function Value (Item : in chars_ptr; Length : in size_t) return char_array; from RM B.3.1(35), followed by function To_Ada (Item : in char_array; Trim_Nul : in Boolean := True) return String; from RM B.3(26). -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .