|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Topic # 1534 |
Float into NUMFIELD |
25/04/2007 @ 09:14 by Newbi Markus
|
Hello,
i am new in progrmming. I can't write numbers like 1.5; 2.86; ... into the NUMFIELD. If i write it in the way 1,5 the number behind the "," will be ignored.
What should i do?
Thank a lot
Markus
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1 -------- 25/04/2007 @ 21:29 by aldweb
visitor |
Hello and welcome to you in the great universe of programming
A NUMFIELD will only accept characters in the [0..9] range + the decimal separator as defined in your preferences (so "," or or "."). Then 1.5 or 1,5 should work! I have no idea why it does not work in your case...
What you can do: use a TEXTFIELD instead. The side effect is that the user can input whatever he wants.
Then, either with TEXTFIELD or with NUMFIELD, retrieve the string with the FIELD$() function, and convert it to a number with the VAL() function. Be careful that if you use "," as the decimal separator, this character should be converted to a "." before applying the VAL() function.
Cheers, aldweb
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2 -------- 25/04/2007 @ 21:57 by Markus
visitor |
Hello aldweb,
thank you, now it works well.
Markus |
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|