Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / val() for floats?

Author
Message
draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 6th Dec 2006 00:22
is there a command like val() that returns a float from a string rather than an integer? I suppose if i really needed it i could write a function myself, but i was hoping i could be lazy
Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 6th Dec 2006 05:58
I thought that's what the val() funciton did o_O

I always had to use int(val()) when gathering an integer from a string. :P

draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 6th Dec 2006 06:28
it returns an integer for me :o
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Dec 2006 10:07
Works for me...



You are of course saving it in a float variable and not an integer variable, aren't you?



draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 7th Dec 2006 18:45
oh man.. hehe.. i feel pretty stupid, i did indeed forget to add a # to one of my variables >_<
sangreal
17
Years of Service
User Offline
Joined: 14th Dec 2006
Location: The Orion Nebula
Posted: 14th Dec 2006 09:42
aahow does one get a remainder after division. I divide 62/4 and all i get is 15 not the 15.5 that I need,

Help ???
Sangreal

Well me fellow,hail

Login to post a reply

Server time is: 2024-11-26 05:55:32
Your offset time is: 2024-11-26 05:55:32