comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: rep clause in generics
Date: 1997/03/15
Date: 1997-03-15T00:00:00+00:00	[thread overview]
Message-ID: <dewar.858442193@merv> (raw)
In-Reply-To: 3329512E.4900@gsfc.nasa.gov


iJonas said

<<Element_Type'size is determined by a run-time parameter, so it is NOT
static.
>>

That's not the correct way to reason. Whether an expression is static or
not is NOT a question of whether the value is determined at run time or
not. There are lots of examples of values that are known at compile time
but are not static expressions. The rules on static expressions are in
RM 4.9. An expression is static iff the rules in 4.9 say it is static. period.

Now in this case, there is no rule that says this expression is static, but
the reasoning is confusing (for example, by this reasoning, one would expect
that 'Size applied to a digits formal should be static, because certainly
the size is known at compile time, since it is fixed for any particular
instantiation).

But this reasoning is faulty, as 4.9 shows, since x'size is still non-static
for a formal digits type x, since there is no rule that says it is static.





  reply	other threads:[~1997-03-15  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-14  0:00 rep clause in generics Jonas Nygren
1997-03-14  0:00 ` Stephen Leake
1997-03-15  0:00   ` Robert Dewar [this message]
1997-03-20  0:00   ` Aaro Koskinen
1997-03-14  0:00 ` Robert A Duff
1997-03-15  0:00   ` Robert Dewar
1997-03-14  0:00 ` Robert Dewar
1997-03-20  0:00   ` Nick Roberts
replies disabled

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