[Gambas-user] Maybe a bug with val functiun

Benoit Minisini gambas at ...2...
Sun Nov 9 18:34:51 CET 2003


Le Dimanche 9 Novembre 2003 08:06, ron a écrit :
> > 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
>
>

In Gambas, NULL and "" must be exactly the same thing. If you can make a 
difference, THIS is a bug !

I will check all comparison functions so that they behave as I wanted !

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...





More information about the User mailing list