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.
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal