From: Shark8 <OneWingedShark@gmail.com>
Subject: Re: Function definitions - with clarification
Date: Sun, 22 Jun 2014 11:45:40 -0600
Date: 2014-06-22T11:45:40-06:00 [thread overview]
Message-ID: <aDEpv.32899$dk.5184@fx04.iad> (raw)
In-Reply-To: <f12eba4c-2757-4496-861b-101cb7e355d6@googlegroups.com>
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 17:45 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 [this message]
2014-06-22 18:03 ` montgrimpulo
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