From: tmoran@bix.com (Tom Moran)
Subject: Re: array question
Date: 1999/01/19
Date: 1999-01-19T00:00:00+00:00 [thread overview]
Message-ID: <36a4316c.39477464@news.pacbell.net> (raw)
In-Reply-To: 78189o$2bj@eng-ser1.erg.cuhk.edu.hk
> i want to ask a question in array.
>type MY_ARRAY is array(INTEGER range <>) of FLOAT;
>what is the meaning of <>,
It's indefinite - array of this type can have various lengths, eg
short : my_array(1 .. 10);
long : my_array(1 .. 10000);
If you said instead
type my_other_array is array(integer range 1 .. 50) of float;
then you could say
x : my_other_array;
y: my_other_array;
but you couldn't say
z : my_other_array(1 .. 10);
since my_other_array type was defined with fixed bounds of 1 .. 50
>also can i replace INTEGER with
>other type? such as FLOAT, BOOLEAN?
Boolean yes, Float no. (How would you go about setting the initial
values of an array(float range 0.1 .. 0.2)? x(0.100000001) := 1;
x(0.100000002) := 2; etc?)
next prev parent reply other threads:[~1999-01-19 0:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-01-19 0:00 array question yukchi
1999-01-18 0:00 ` bill
1999-01-19 0:00 ` David C. Hoos, Sr.
1999-01-19 0:00 ` Matthew Heaney
1999-01-19 0:00 ` Tom Moran [this message]
1999-01-23 0:00 ` Bryan Shayne
-- strict thread matches above, loose matches on Subject: below --
2014-02-10 3:49 agent
2014-02-10 5:39 ` Jeffrey Carter
2014-02-10 12:41 ` agent
2014-02-10 13:40 ` Mike H
2014-02-10 15:13 ` Mike H
2014-02-10 16:41 ` Robert A Duff
2014-02-10 17:02 ` Mike H
2014-02-11 22:25 ` agent
2014-02-12 16:48 ` Mike H
2014-02-11 1:47 ` Dennis Lee Bieber
2014-02-11 14:22 ` Mike H
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox