|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Sujet n° 987 |
Negative numbers in NUMFIELD |
le 21/11/2004 @ 17:29 par Chuck
|
I can't enter a minus sign in a NUMFIELD. I need to input both positive and negative numbers. How do I do that? |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1 -------- le 21/11/2004 @ 18:02 par aldweb
visiteur |
Hello Chuck,
This is a limitation which comes from Palm OS itself. So, there is nothing I can do about it...
But, there is a workaround.
Use a TEXTFIELD, and then convert the string result to a numerical value, using VAL (which itself includes some checks to return a valid number). Something like this for example:
N$=FIELD$(#1) N=VAL(N$)
Or build your own check routine, to check that all characters of N$ are in ["-","0".."9","."]
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/11/2004 @ 22:19 par aldweb
visiteur |
Chuck,
When driving back from work tonight on my motorbike, I thought again about your question (it is already a few days old, never try to understand a brain, especially mine!).
You may also use a standard NUMFIELD with a small BUTTON in front of it. When you click on the button, it switches from "+" to "-" and you know the sign
Be creative Cheers
@+ aldweb |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3 -------- le 26/11/2004 @ 05:21 par Chuck
visiteur |
Thanks for the idea. I already have an associated checkbox I can use for this purpose. |
|
|
sujet actif
sujet clos
Important!
Nouveau message -
Rectifier message
Clôturer sujet
Remonter
|
|