comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Beneschan <adambeneschan@gmail.com>
Subject: Re: Why this program does not compile? (iterators)
Date: Fri, 22 Aug 2014 17:31:36 -0700 (PDT)
Date: 2014-08-22T17:31:36-07:00	[thread overview]
Message-ID: <270db002-d169-4759-895a-555482866925@googlegroups.com> (raw)
In-Reply-To: <74cdd2cf-7680-4bd5-9931-3a2b4e109dc2@googlegroups.com>

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?
> 
> >    overriding function First (Object: My_Description_Iterator) return My_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 aggregate 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 functions normal functions, instead of expression functions, doesn't fix the problem.  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 accepting).

I'd say that if the compiler is displaying "<built-in>" where it normally displays a source file name, something has gone very haywire.

                            -- Adam



  reply	other threads:[~2014-08-23  0:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-22 17:18 Why this program does not compile? (iterators) Victor Porton
2014-08-22 23:39 ` Randy Brukardt
2014-08-23  4:56   ` Victor Porton
2014-08-23  0:15 ` Egil H H
2014-08-23  0:31   ` Adam Beneschan [this message]
2016-04-22 11:14 ` mockturtle
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox