[Gambas-user] Questions about string

Benoit Minisini gambas at ...1...
Thu Jul 19 13:38:35 CEST 2007


On mercredi 18 juillet 2007, Wellington de Souza Pinto wrote:
> Hi Benoit!
>
> I'm using gambas2-49 and in my program have one function:
>
> private function myfunc(optional aItem as variant = null) as boolean
>    if isnull(aitem) then
>       return true
>    else
>       return false
>    endif
> end
>
> The call:
>
> print myfunc()       -> true
> print myfunc("")     -> true
> print myfunc("1")   -> false
>
> Question:
>
> "" is equal NULL????
>
> tks,
>
> Souza, Wellington

Yes. 

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

If you can write some code that can make the difference between them, then it 
is a bug!

Regards,

-- 
Benoit Minisini




More information about the User mailing list