Re: [fpc-pascal] Find the nature of a pointer

2006-09-02 Thread Marco van de Voort
> [EMAIL PROTECTED] (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 Hand

Re: [fpc-pascal] Find the nature of a pointer

2006-09-01 Thread Mattias Gaertner
On Fri, 1 Sep 2006 20:08:30 +0200 (CEST) [EMAIL PROTECTED] (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

Re: [fpc-pascal] Find the nature of a pointer

2006-09-01 Thread Marco van de Voort
> 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 s

Re: [fpc-pascal] Find the nature of a pointer

2006-09-01 Thread Jonas Maebe
On 1 sep 2006, at 19:54, Felipe Monteiro de Carvalho 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, if only because there is no generic way to distinguish a random record whi