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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.236.180.202 with SMTP id j50mr11324811yhm.51.1408753897329; Fri, 22 Aug 2014 17:31:37 -0700 (PDT) X-Received: by 10.50.80.42 with SMTP id o10mr45342igx.4.1408753897235; Fri, 22 Aug 2014 17:31:37 -0700 (PDT) Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!i13no2051199qae.1!news-out.google.com!ef6ni1igb.0!nntp.google.com!uq10no3626833igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 22 Aug 2014 17:31:36 -0700 (PDT) In-Reply-To: <74cdd2cf-7680-4bd5-9931-3a2b4e109dc2@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: <74cdd2cf-7680-4bd5-9931-3a2b4e109dc2@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <270db002-d169-4759-895a-555482866925@googlegroups.com> Subject: Re: Why this program does not compile? (iterators) From: Adam Beneschan Injection-Date: Sat, 23 Aug 2014 00:31:37 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2425 X-Received-Body-CRC: 3120382101 Xref: number.nntp.dca.giganews.com comp.lang.ada:188600 Date: 2014-08-22T17:31:36-07:00 List-Id: On Friday, August 22, 2014 5:15:42 PM UTC-7, Egil H H wrote: > On Friday, August 22, 2014 7:18:45 PM UTC+2, Victor Porton wrote: > > Why this program does not compile? >=20 > > overriding function First (Object: My_Description_Iterator) return M= y_Description_Cursor is (null record); > > overriding function Next (Object: My_Description_Iterator; Position:= My_Description_Cursor) return My_Description_Cursor is (null record); > A result of an expression function should be within parenthesis, an aggre= gate should as well. Try double parenthesis to return an aggregate from an = expression function. That doesn't make the error go away. Even making the First and Next functi= ons normal functions, instead of expression functions, doesn't fix the prob= lem. The problem appears to be with the "for" statement: comment that out,= and there's no more error (even with only single parentheses around "null = record", which I think is a syntax error that the compiler should not be ac= cepting). I'd say that if the compiler is displaying "" where it normally d= isplays a source file name, something has gone very haywire. -- Adam