hi!
Zaka E-Lab typed:
> 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.
(Most) Pascal implementations do not initialize variables on creation.
So the value of the pointer variable is undefined. with normal pascal u
can only solve this by setting the variable to nil b4 u really use them.
ok, setting them to nil is usage already ... so if it was used at that
point u are still in trouble.
that'S why u should do that right after declaration (in execution order
of course) ;)
var p: pstruck;
begin
p := nil
...
end;
greetz
jo
--
http://radio789.net.ms
- Radio 789 - We play it ALL
Radiostream: http://stream789.net.ms


|