Look at the following program:
program pack2;
type pr = packed record r: record j : integer end end;
var v : pr;
procedure foo(var i : integer);
begin
end;
begin
foo(v.r.j);
end
..
I think this program _should_ be illegal (otherwise possibilities
to pack pr would be quite limited), but I can not find full justification
based on ISO 7185 or ISO 10206. Namely, 6.6.3.3 (in ISO 7185) and
6.7.3.3 (in ISO 10206) tells us that components of packed records
should not be passed as var parameters. But "j" is a component of "r",
which is not a packed record. The question is if "j" is a
component of "v"? I was not able to find any definition of
component in the standards, but it seems that in the standards
component means what could be otherwise called "direct component".
If "j" is not a component of "v", then AFAICS the program above
is legal...
Any comments?
--
Waldek Hebisch
hebisch@[EMAIL PROTECTED]