[fpc-devel] test on TP

Gerhard Scholz gs at g--s.de
Wed May 14 12:10:47 CEST 2014


BP 7.0 (real)
BP7.0 (protected)
VP2.1b279

all: "not assigned"
----- Original Message ----- 
From: "Marco van de Voort" <marcov at stack.nl>
To: <fpc-devel at lists.freepascal.org>
Sent: Wednesday, May 14, 2014 11:46 AM
Subject: [fpc-devel] test on TP


> 
> 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.
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel



More information about the fpc-devel mailing list