From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ae9451f54a74fd7b X-Google-Attributes: gid103376,public From: tmoran@bix.com (Tom Moran) Subject: Re: array question Date: 1999/01/19 Message-ID: <36a4316c.39477464@news.pacbell.net>#1/1 X-Deja-AN: 434348555 References: <78189o$2bj@eng-ser1.erg.cuhk.edu.hk> X-Complaints-To: abuse@pacbell.net X-Trace: typhoon-sf.pbi.net 916730574 206.170.2.207 (Mon, 18 Jan 1999 23:22:54 PDT) Organization: SBC Internet Services NNTP-Posting-Date: Mon, 18 Jan 1999 23:22:54 PDT Newsgroups: comp.lang.ada Date: 1999-01-19T00:00:00+00:00 List-Id: > 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?)