[fpc-pascal] How are Assigned, Free, Nil and Destroy related?

Marco van de Voort marcov at stack.nl
Sat Oct 22 13:03:14 CEST 2011


In our previous episode, Felipe Monteiro de Carvalho said:
> Nil is not a routine, it is a value, it means that the object is
> empty, it does not exist / is not allocated. Nil in existing
> implementations that I know is represented by the value zero.

Look better in, euh, Free Pascal, and see what is assigned in this case:-)


type txxxx = procedure (a,b:integer) of object;
 
var x : txxxx;
begin
  x:=nil;
end.

nil is not always zero. Sometimes it is double zero :-)






More information about the fpc-pascal mailing list