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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b672743914db49f X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!k79g2000hse.googlegroups.com!not-for-mail From: Tomek Wa kuski Newsgroups: comp.lang.ada Subject: Re: "Ada Gems": Constructor functions Date: Wed, 12 Sep 2007 07:39:31 -0000 Organization: http://groups.google.com Message-ID: <1189582771.755063.63050@k79g2000hse.googlegroups.com> References: <1189015827.384331.17490@k79g2000hse.googlegroups.com> <1189161491.346922.174530@g4g2000hsf.googlegroups.com> <1189275647.196090.47920@19g2000hsx.googlegroups.com> <1189431964.575522.250700@g4g2000hsf.googlegroups.com> <46e647af$0$30379$9b4e6d93@newsspool4.arcor-online.net> <1189546433.646201.242950@e34g2000pro.googlegroups.com> NNTP-Posting-Host: 83.26.87.51 Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-Trace: posting.google.com 1189582781 5173 127.0.0.1 (12 Sep 2007 07:39:41 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Sep 2007 07:39:41 +0000 (UTC) In-Reply-To: <1189546433.646201.242950@e34g2000pro.googlegroups.com> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; pl; rv:1.8.1.6) Gecko/20070801 Firefox/2.0.0.6,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: k79g2000hse.googlegroups.com; posting-host=83.26.87.51; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Xref: g2news2.google.com comp.lang.ada:1901 Date: 2007-09-12T07:39:31+00:00 List-Id: On 11 Wrz, 23:33, Anh Vo wrote: > One interesting observation, if the return statement is > qualified as shown below, it is compiled on Windows, too. > > return Object'(Name => To_Unbounded_String (Name)); > This compiles on Windows and also on Gentoo box with gnat- gpl-4.1.3.2007 (which is in fact GNAT GPL 2007 from AdaCore). This also works: return New_Object : Object do New_Object.Name := To_Unbounded_String (Name); end return; Mystery solved? :) So... bug must persist in Ada Gems article :) Tomek