[fpc-pascal] Find the nature of a pointer
    Marco van de Voort 
    marcov at stack.nl
       
    Sat Sep  2 11:54:34 CEST 2006
    
    
  
> 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?
Admitted, the examples I know are not-protected mode systems with rom or a
zp on address 0. 
    
    
More information about the fpc-pascal
mailing list