[fpc-pascal] Pointers in Pascal!!
Zaka E-Lab
shanatorio at gmail.com
Tue Apr 29 14:48:43 CEST 2008
Maybe I haven't explain it correctly. What I want is to construct a
Unit that contains some procedures, one of them is
create(var p : PStruct), and other is delete(var p : PStruct).
I don't create anything, the memory is allocated by the create
procedure. How can the procedure know if the argument is a pointer
already allocated or not?
I hope I've explain good enough.
Thanks.
Zaka.
Leonardo M. Ramé escribió:
> You can assign "nil" to the pointer before using it, then check if PStruct = nil it wasn't
> created.
>
> Leonardo.
More information about the fpc-pascal
mailing list