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-Thread: 103376,cced0e2ac94722f3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Received: by 10.68.74.201 with SMTP id w9mr4688313pbv.0.1325867859655; Fri, 06 Jan 2012 08:37:39 -0800 (PST) Path: lh20ni144706pbb.0!nntp.google.com!news1.google.com!postnews.google.com!24g2000yqi.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: Ada2012 : Expression functions and extended return statements Date: Fri, 6 Jan 2012 08:36:47 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <26f343ea-d694-4089-b594-f32b471db3a4@m4g2000vbc.googlegroups.com> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 X-Trace: posting.google.com 1325867807 32279 127.0.0.1 (6 Jan 2012 16:36:47 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 6 Jan 2012 16:36:47 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: 24g2000yqi.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: ARLUEHNKC X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; WOW64; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-01-06T08:36:47-08:00 List-Id: On Jan 6, 2:02=A0am, Martin wrote: > > > =A0 =A0function Characters(I: Integer; Filler: Character :=3D '_') retu= rn String is > > =A0 =A0begin > > =A0 =A0 =A0 return Result: String(1..I) :=3D (others =3D> Filler) do > > =A0 =A0 =A0 =A0 return; > > =A0 =A0 =A0 =A0 =A0 ^^^^^^^ > > I think you mean > =A0 =A0 =A0 =A0 null; > or > =A0 =A0 =A0 =A0 return Result: String(1..I) :=3D (others =3D> Filler); Stefan's code is legal Ada--there's nothing wrong with it. Of course, adding a "do" part would be redundant if it doesn't do anything except return immediately. -- Adam