|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Sujet n° 1534 |
Float into NUMFIELD |
le 25/04/2007 @ 09:14 par 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
Réponse n° 1 -------- le 25/04/2007 @ 21:29 par aldweb
visiteur |
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
Réponse n° 2 -------- le 25/04/2007 @ 21:57 par Markus
visiteur |
Hello aldweb,
thank you, now it works well.
Markus |
|
|
sujet actif
sujet clos
Important!
Nouveau message -
Rectifier message
Clôturer sujet
Remonter
|
|