Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Ansi -iso > Packed record f...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 177 of 211
Post > Topic >>

Packed record fields

by Waldek Hebisch <hebisch@[EMAIL PROTECTED] > Jan 31, 2006 at 10:48 PM

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]





 2 Posts in Topic:
Packed record fields
Waldek Hebisch <hebisc  2006-01-31 22:48:19 
Re: Packed record fields
scott moore <nospam@[E  2006-02-01 01:32:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 0:09:43 CDT 2008.