there should not be a temp as the object referenced needs to be modified
using it's "set" method "on the fly" i.e. a second reference to that
object within the called procedure needs to reflect the changes made in
the instruction just executed. Everything else would be very ambiguous.
-Michael
example
type
Tx = class,,
fz: integer;
..
procedure sety(value: integer);
...
property y: integer write sety
property z: integer read fz write fz
end;
var
x: tx
function sub (var i: integer): integer;
begin
i := 4;
Result := x.z;
end;
procedure Tx. sety(value: integer);
begin
fz := value;
end;
procedure main;
begin
x := Tx.create;
test := sub(x.y);
end;
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel