From: l107353@cliffy.lfwc.lockheed.com (Garlington KE)
Subject: Re: Re : Run time sizing of arrays - HELP
Date: 8 Feb 1995 15:51:38 GMT
Date: 1995-02-08T15:51:38+00:00 [thread overview]
Message-ID: <3hapaa$lva@cliffy.lfwc.lockheed.com> (raw)
In-Reply-To: D3MnI7.E8A@aston.ac.uk
Marcel Hawtin (hawtinml@aston.ac.uk) wrote:
: I'm new to Ada, and was wondering if it is possible for the size of arrays to be
: determined at run time.
: For example, many years ago it was possible to say in BASIC something like :
: 10 INPUT A
: 20 INPUT B
: 20 DIM(A,B)
The equivalent in Ada would go something like:
A, B : Positive;
..
Pos_IO.Get(A);
Pos_IO.Get(B);
declare
type Some_Dynamic_Array_Type is array (1 .. A, 1 .. B) of Some_Object;
C : Some_Dynamic_Array_Type;
begin
..
Notice I said "Something" like, since (1) I don't have an Ada compiler on
this machine and (2) there's several other ways (all better, I'm sure) for
creating C and (3) it's been a long time since I wrote any BASIC.
--------------------------------------------------------------------
Ken Garlington GarlingtonKE@lfwc.lockheed.com
F-22 Computer Resources Lockheed Fort Worth Co.
If LFWC or the F-22 program has any opinions, they aren't telling me.
prev parent reply other threads:[~1995-02-08 15:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-02-07 11:20 Re : Run time sizing of arrays - HELP Marcel Hawtin
1995-02-08 15:51 ` Garlington KE [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox