[fpc-pascal] Find the nature of a pointer
Mattias Gaertner
nc-gaertnma at netcologne.de
Sat Sep 2 00:31:07 CEST 2006
On Fri, 1 Sep 2006 20:08:30 +0200 (CEST)
marcov at stack.nl (Marco van de Voort) wrote:
> > I have a function that will receive a Handle. That handle could be a
> > pointer to a structure, or a object. Is there any safe way to
> > discover it's nature?
>
> No you can't.
>
> > The following code will work when the Handle is an Object or nil,
> > but will crash the application when the Handle is a structure:
>
> It is not even 100% save for that, some systems use other values
> instead of nil/0.
For example?
Mattias
More information about the fpc-pascal
mailing list