On Tue, 02 Sep 2003 18:42:25 +0200, Henning Thielemann wrote:
....
>
> It is even possible to go one step further: PROCEDURE and ARRAY are very
> similar. In the mathematical sense they are mappings. They only differ
in
> the implementation: PROCEDUREs employ some computations to get the
results
> whereas ARRAYs stores all possible results simultanously. The input
> arguments of a PROCEDURE are like indices of an ARRAY and can be
perfectly
> collected in a RECORD. ...
Actually, this is only true when an element of the array is read. But
a subscripted array A[I} can also appear on the LHS of an assignment,
and in this way arrays are quite different. Ada tried to pretend the
similarity was greater than it is by using parentheses for both array
subscripting and actual parameters to a call. By the time the unfortunate
consequences all fell, the notation A(I) ended up with 19 semantically
distinct kinds of possible meanings, all syntactically identical.
Figuring out what it really means can depend on context information taken
from many scopes.
Well, maybe I am remembering wrong and it is only 17. At the present
hour, I don't have the energy to go through them and count again.
--
Rodney M. Bates


|