[Gambas-user] Maybe a bug with val functiun
ron
ronstk at ...239...
Sun Nov 9 08:06:32 CET 2003
> Message: 5
> From: Olivier Coquet <olinux at ...289...>
> Organization: Serengeti
> To: gambas-user at lists.sourceforge.net
> Subject: Re: [Gambas-user] Maybe a bug with val functiun
> Date: Sat, 8 Nov 2003 18:03:29 +0100
> Reply-To: gambas-user at lists.sourceforge.net
>
> Le Samedi 08 Novembre 2003 18:00, Olivier Coquet a =E9crit :
> > i think i've detected a bug in the Val() function gambas V0.71 on RH9
> >
> > i'll try to be clare but........
> >
> > if you use the val() function on a variable called num
> > like this:
> >
> > i=3Dval(num)
> >
> > if num is =3D to "123" all is ok, but if num=3D"ert" sometime this
> > result=
>
> in
>
> > NULL for i, sometime this result in an error mismatch date, num or
> > boolean expected.
>
> I think it's not the val funct which is bad but the > operator whic is=20
> bad......
>
> regards
> Olivier
>
May be if you try RETURN (Cstr("")) instead of RETURN ("")
I found a same problem when i fill a array with "" (emty strings)
arr=["","","",""] 'all entries are 'Null'
must corected to
arr=[Cstr(""),"","",""] all entries are now ""
Gambas sees a variable preset with "" as Null in relational compares as
anemtystring=""
IF anemptystring = "" THEN
print "this is empty"
ELSE
print "this is NULL"
ENDIF
More information about the User
mailing list