On 18 Feb 2003 at 20:48, Adriaan van Os wrote:
[...] (3) typed pointer in procedural parameter list passed as actual
parameter. Works not in GPC and not in Delphi.
And IMHO, it shouldn't.
All three cases work in Macintosh Pascal compilers (with UNIV attached to the pointer type).
I doubt the value of such a feature. This is the type of thing that typecasts for absolute variables can be used for.
e.g., instead of this: procedure writerec( rp: recptr); begin writeln( 'a = ', rp^.a, ', b = ', rp^.b) end;
you can have this: procedure writerec( p: pointer); var rp : recptr absolute p; begin writeln( 'a = ', rp^.a, ', b = ', rp^.b) end;
or this: procedure writerec( rp: pointer); begin writeln( 'a = ', recptr (rp)^.a, ', b = ', recptr (rp)^.b) end;
At the risk of trying to teach one's grandmother how to suck eggs, these seem to me to be less error prone. They also make it clearer what one is actually doing and do not require changes to the compiler. However, for the sake of compatibility, it might be worth implementing (I personally remain unconvinced - but I guess that this is a matter for Frank).
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/