[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gambas-user
Subject:    Re: [Gambas-user] Maybe a bug with val functiun
From:       Benoit Minisini <gambas () users ! sourceforge ! net>
Date:       2003-11-11 13:33:49
[Download RAW message or body]

Le Mardi 11 Novembre 2003 00:44, ron a écrit :
> > > 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 gb.String  (v0.65)
> > >
> > > 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 think this is the case and so it's true but there can be an exception.
>
> > I will check all comparison functions so that they behave as I wanted !
> >
> > Regards,
> >
> > -- 
> > Benoit Minisini
> > mailto:gambas@users.sourceforge.net
>
> Hi Benoit,
> It is a mess with those html/= stuff.
>
> I need a array preset with "" like arr=["","","",""] and this was not
> posible. The array arr is a String[] and will add later to a Variant[]
> array.
>
> As in the help about arrays you say the first element determines the type
> of the following entries.
> In the case of the first element was a "" wich is equal as Null my array
> was all with Null. I asume all entries are then gb.Null
> Changing the first element to use CStr("") resolves the problem and all
> elements in the array are default type of gb.String with a content of Null.
> In the program there are string operations with these cells and they didn't
> accept it at the time i used 0.63 and giving me typecast errors.
>

Hi, Ron.

I'm sorry, this is a stupid bug in the Array() or [...] function. Doing [""]
will create a unusable array instead of creating a String array ! I will
correct it in the next version...

Regards,

--
Benoit Minisini
mailto:gambas@users.sourceforge.net



-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic