From: montgrimpulo <aghte@hotlinemail.com>
Subject: Re: Function definitions - with clarification
Date: Sun, 22 Jun 2014 11:03:01 -0700 (PDT)
Date: 2014-06-22T11:03:01-07:00 [thread overview]
Message-ID: <bad50ba6-9ea4-410f-9574-a33f30f0fe0f@googlegroups.com> (raw)
In-Reply-To: <aDEpv.32899$dk.5184@fx04.iad>
Direct reply to Shark8
What is the point of saying "the above won't work" when it was
obviously forgotten to indicate a type ? What is the point of changing my
function F into a procedure F with an embedded procedure G ?
This does not make sense at all.
What is then left as your contribution ?
On Sunday, June 22, 2014 7:45:40 PM UTC+2, Shark8 wrote:
> On 22-Jun-14 05:34, montgrimpulo wrote:
>
> > type Individual (P, Q, R) is record
>
> > X : x_array (0..P);
>
> > Y : y_array (0..Q);
>
> > Z : z_array (0..R);
>
> > end record;
>
>
>
> The above won't work, your discriminants have no type-indication -- how
>
> is the compiler supposed to know what P, Q, and R are in the context of
>
> the type?
>
>
>
> It;s a lot like nested scopes the following won't work because the new
>
> definition of X has no type;
>
>
>
> Procedure F(X: in Integer) is
>
> Procedure G is
>
> X; -- Variable declaration missing type.
>
> begin
>
> null;
>
> end G;
>
> begin
>
> null;
>
> end F;
>
>
>
> You want that to be like this:
>
>
>
> type Individual (P, Q, R : Positive) is record
>
> X : x_array (0..P);
>
> Y : y_array (0..Q);
>
> Z : z_array (0..R);
>
> end record;
next prev parent reply other threads:[~2014-06-22 18:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-22 11:34 Function definitions - with clarification montgrimpulo
2014-06-22 12:04 ` Simon Clubley
2014-06-22 14:25 ` montgrimpulo
2014-06-22 15:30 ` Georg Bauhaus
2014-06-22 17:29 ` montgrimpulo
2014-06-22 17:45 ` Shark8
2014-06-22 18:03 ` montgrimpulo [this message]
2014-06-22 18:45 ` Simon Clubley
2014-06-22 19:28 ` montgrimpulo
2014-06-22 21:04 ` Simon Wright
2014-06-22 21:17 ` Jeffrey Carter
2014-06-22 19:55 ` Shark8
2014-06-23 16:26 ` Adam Beneschan
2014-06-29 15:31 ` cotswold
2014-06-29 19:20 ` montgrimpulo
2014-06-30 9:29 ` G.B.
2014-06-30 17:55 ` Shark8
2014-07-01 8:58 ` Georg Bauhaus
2014-07-04 6:45 ` J-P. Rosen
2014-06-30 13:23 ` montgrimpulo
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox