comp.lang.ada
 help / color / mirror / Atom feed
From: Evans@TL-20B.ARPA ("Art Evans")
Subject: static array types
Date: Fri, 26-Jun-87 13:37:19 EDT	[thread overview]
Date: Fri Jun 26 13:37:19 1987
Message-ID: <8706262216.AA21706@ucbvax.Berkeley.EDU> (raw)

Ada never permits an array type to be static.  This fact follows from
the third sentence of 4.9(11).

I see no reason why a type such as
	type T is array(1..2) of integer;
should not be considered static.  In particular, I find it reasonable
that an array type be considered static if both of the following
requirements are met:
	All indices must be static ranges; and
	the array element type must be static.
(A similar rule can be developed for record types.)  If such a type is
static, it should then follow that 'size of such a type (or an object of
such a type) should be static.

This problem bit us when we tried to use the size of an array in a rep
spec, where a static value is required.

Art Evans
Tartan Labs
-------

                 reply	other threads:[~1987-06-26 17:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox