[fpc-pascal] Pointers in Pascal!!
    Leonardo M. Ram� 
    martinrame at yahoo.com
       
    Tue Apr 29 13:24:40 CEST 2008
    
    
  
You can assign "nil" to the pointer before using it, then check if PStruct = nil it wasn't
created.
Leonardo.
--- Zaka E-Lab <shanatorio at gmail.com> wrote:
> I have something like this:
> 
> PStruct = ^Struct;
> Struct = record
>           num    : integer;
>           end;
> 
> I have a unit to handle that structure ( is a bit more complicated, but
> is a good example), in this unit I have a procedure that deletes (
> disposes ) the pointer. How can I know if a pointer are created or not?,
> I mean, I don't wont to try to delete something that has not been
> created yet, but I don't know how to do it, if that is possible.
> 
> Thanks a lot.
> 
> Zaka.
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> 
      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
    
    
More information about the fpc-pascal
mailing list