[Gambas-user] IsObject(NULL)

Benoît Minisini gambas at ...1...
Wed Nov 24 12:47:30 CET 2010


> i will describe my thoughts about that,
> 
> i read the
> 
> http://gambasdoc.org/help/cat/constants
> 
> and i saw that a TRUE or FALSE value is a Language constant.
> Also NULL is a Language constant!
> 
> So i expected from IsObject() to return FALSE when it is feed with
> constants as argument.
> 
> So
> PRINT IsObject(TRUE)       'False
> PRINT IsObject(FALSE)      'False
> PRINT IsObject(0)          'False
> PRINT IsObject("a string") 'False
> 
> But
> PRINT IsObject(NULL)       'True
> 
> Some more thoughts..
> In wiki says that NULL is a void string
> and indeed...
> 
> PRINT IsObject("")	'True
> 
> 1) But what if someone want to check a void string?
> 2) How a
>    PRINT IsObject("a string") 'is False
>    and a
>    PRINT IsObject("") 'is not False
> 
> both are strings and not Objects.
> 

In Gambas, NULL and the void string are the same thing.

-- 
Benoît Minisini




More information about the User mailing list