|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Topic # 987 |
Negative numbers in NUMFIELD |
21/11/2004 @ 17:29 by 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
Answer n° 1 -------- 21/11/2004 @ 18:02 by aldweb
visitor |
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
Answer n° 2 -------- 25/11/2004 @ 22:19 by aldweb
visitor |
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
Answer n° 3 -------- 26/11/2004 @ 05:21 by Chuck
visitor |
Thanks for the idea. I already have an associated checkbox I can use for this purpose. |
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|