Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Bug Report (https://forums.graalonline.com/forums/forumdisplay.php?f=193)
-   -   0.0 (https://forums.graalonline.com/forums/showthread.php?t=85977)

zokemon 05-30-2009 07:03 AM

0.0
 
If a column in a table is set to the REAL datatype and you put the number 0 in, when you return this value back, you get a .0 at the end of it. Normally that would be fine but Graal doesn't see 0.0 as a number, it thinks it is text (0.1 or 1.0 though would be a number).

I would say this is a problem with the SQLite but in all honesty, why can't Graal see 0.0 as a number?

In all fairness to my namesake, I find this rather insulting.

Pelikano 05-30-2009 10:43 AM

It doesn't see 0 as a number either, does it?

zokemon 05-30-2009 12:45 PM

Graal will see 0 as a number, yes. 0 + 1 will give 1 but 0.0 + 1 will give 0

Admins 05-30-2009 02:45 PM

Hmmm problem of the C++ atod function, will check if we can replace it with strtod. 0.0 + 1 should still give 1 though.

zokemon 05-31-2009 07:39 AM

Quote:

Originally Posted by Stefan (Post 1495414)
Hmmm problem of the C++ atod function, will check if we can replace it with strtod. 0.0 + 1 should still give 1 though.

Well I simply did a requestsql("SELECT etc", true); and echoed the result of each row +1 (for the column that had the real numbers). Rows with 1 in them returned 2 while rows with 0 in them returned just 0. Also, when I didn't have the +1, they returned 1.0 and 0.0 respectively.


All times are GMT +2. The time now is 10:19 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.