mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 08:28:08 +02:00
25 lines
300 B
ObjectPascal
25 lines
300 B
ObjectPascal
{$mode objfpc}
|
|
program change;
|
|
|
|
type
|
|
aclasstype = class
|
|
prop : integer;
|
|
end;
|
|
|
|
procedure trychange (const aclass : aclasstype);
|
|
begin
|
|
aclass.prop := 5;
|
|
end;
|
|
|
|
var
|
|
aclass : aclasstype;
|
|
|
|
begin
|
|
aclass := AClassType.Create;
|
|
try
|
|
trychange (aclass)
|
|
finally
|
|
aclass.free;
|
|
end;
|
|
end.
|