Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Bug Report
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 05-30-2009, 07:03 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
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.
__________________
Do it with a DON!

Last edited by zokemon; 05-30-2009 at 07:40 AM..
Reply With Quote
  #2  
Old 05-30-2009, 10:43 AM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
It doesn't see 0 as a number either, does it?
Reply With Quote
  #3  
Old 05-30-2009, 12:45 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Graal will see 0 as a number, yes. 0 + 1 will give 1 but 0.0 + 1 will give 0
__________________
Do it with a DON!
Reply With Quote
  #4  
Old 05-30-2009, 02:45 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Hmmm problem of the C++ atod function, will check if we can replace it with strtod. 0.0 + 1 should still give 1 though.
Reply With Quote
  #5  
Old 05-31-2009, 07:39 AM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Quote:
Originally Posted by Stefan View Post
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.
__________________
Do it with a DON!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:26 AM.


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