[fpc-pascal] const parameter writeable
fpc505 at z505.com
Mon May 1 20:07:55 CEST 2006
> > Only the pointer itself is the parameter and read-only. Where the pointer
> > points to is irrelevant.
I remember this from using classes where you can still access the class properties -
should have thought about that before posing the question :).
> But in this case I'm wondering why you want to give a pointer instead
> of the real type?
did you mean this ? :
procedure ChangeRec1(const Rec: TSomeRec);
Rec.a:= 'string A';
Because I can't pass a PSomeRec to that function, only a TSomeRec
Otherwise, I don't know what you mean..
More information about the fpc-pascal