: If the parameter苯orm of the variable計arameter貞pecification contains a
: schema要ame, all of the corresponding actual計arameters contained by the
: activation計oint of an activation shall possess the same underlying負ype
: that is produced from the schema denoted by the schema要ame with a
tuple.
What does this mean? "The same type ... produced from a schema"
would seem to mean the same discriminants, but this can in general
only be checked at runtime, so shouldn't it have been a
dynamic-violation (or error) then, rather than "shall" (in
accordance with 3.2, note 1)?
I.e., should the program below be ok, a compile time error, or a
runtime error?
program foo;
type
t (n: Integer) = array [1 .. n] of Integer;
var
a, b: ^t;
procedure p (var a, b: t);
begin
end;
begin
New (a, 42);
New (b, 1);
p (a^, b^)
end.
(Another paragraph below speaks of schematic types, but as these are
"discriminated" schemata, this refers to another case where it's
made clear that it's a dynamic-violation.)
I discussed the issue with Waldek Hebisch and he wrote: "Literally,
we should solve the halting problem... I think that this is an error
in the standard, and both value parameter case make clear what was
the intent: check at compile time that the same schema is used and
do check for equal tuples at runtime."
(For value parameters, the 2nd and 3rd paragraphs of 6.7.3.2 make it
an error or dynamic-violation resp. if the length (for `String') or
discriminants (for other schemata) don't match. -- Also a
dynamic-violation on mismatch when the formal parameter is a
schematic type via the rule of assignment-compatibility, except for
strings.)
So, are we missing something, or should we assume that a
dynamic-violation was meant in the paragraph above (and thus, the
program above should raise a runtime error)?
Frank
--
Frank Heckenbach, frank@[EMAIL PROTECTED]
and PGP keys: http://fjf.gnu.de/plan
(7977168E)


|