[fpc-devel] test on TP
Marco van de Voort
marcov at stack.nl
Wed May 14 11:46:35 CEST 2014
Can sb test this program on TP/BP7 and tell me the result? Thank you.
program sometest;
{$ifdef fpc}
{$mode tp}
{$endiof}
Type
PChildThing = ^TChildThing;
TChildThing = object
constructor init;
end;
PSomething = ^TSomething;
TSomething = object
ct:PChildThing;
constructor init;
end;
constructor TSomething.init;
begin
new(ct,init);
end;
var p : PSomething;
constructor TChildThing.Init;
begin
if assigned(p) then
writeln('assigned')
else
writeln('not assigned')
end;
begin
p:=nil;
p:=new(PSomething,Init);
end.
More information about the fpc-devel
mailing list