stringToNumber(null) = -1.0

Discuss all problems you have with Servoy here. It might help to mention the Servoy version and Operating System version you are using

stringToNumber(null) = -1.0

Postby IT2Be » Tue Dec 09, 2003 5:09 pm

Don't know if this is a bug but I certainly don't like it since I now have to use conditions everywhere...

When I do a query and use the result (getValue) to convert it to a number (stringToNumber) the following happens:

when the queryresult = '1.0': stringToNumber('1.0') = 1.0... OK

when the queryresult = null: stringToNumber(null) =.... 1.0 or -1.0 ?????
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Postby Jan Blok » Thu Dec 11, 2003 11:44 am

Behaviour changed to return 0 when supllied a null value, will be availible in Servoy 2.0
Jan Blok
Servoy
Jan Blok
 
Posts: 2684
Joined: Mon Jun 23, 2003 11:15 am
Location: Amsterdam


Return to Discuss possible Issues and Bugs

Who is online

Users browsing this forum: No registered users and 7 guests