: When an identifier or label has a definingpoint for a region,
: another identifier or label with the same spelling shall not have
: a definingpoint for that region unless both identifiers are
: im****ted identifiers and denote the same value, variable,
: procedure, function, schema, or type.
Question: What is the "same value"?
Does it mean values for which `=' would be true (at least for types
that `=' is defined on), e.g. in the following code, do a and b
denote the same value?
const
a = 2;
b = 1 + 1;
This gets tricky for real numbers, as arithmetics are
implementationdefined approximations. This is related to the
question whether (given a compiler) the arithmetics done at
compile-time must be equivalent to those done at run-time, or
whether they could, e.g., use higher precision. E.g., in the
following code, can and/or must c and d denote the same value?
const
c = 1.0;
d = Sin (0.4) * Sin (0.4) + Cos (0.4) * Cos (0.4);
Or does the "same value" only mean such values that come from the
same definition? In this case, both examples above would not denote
the same value, but e and f would:
ex****t Foo = (e, e => f);
const
e = 42;
And what about simple constant definition equalities, such as:
const
g = Sin (0.4) * Sin (0.4) + Cos (0.4) * Cos (0.4);
h = g;
Any pointers to relevant parts of the standard are appreciated.
Frank
--
Frank Heckenbach, frank@[EMAIL PROTECTED]
http://fjf.gnu.de/
GnuPG and PGP keys: http://fjf.gnu.de/plan
(7977168E)
Pascal code, BP CRT bugfix: http://fjf.gnu.de/programs.html
Free GNU Pascal Compiler: http://www.gnu-pascal.de/


|