aldweb

Close I. aldweb

Close II. PC Freeware

Close III. Palm Freeware

Close IV. Palm Shareware

Close V. iziBasic Palm

Close VI. Palm Knowledge

Close VII. Pocket Computer

Close VIII. miniPortail

Special !



Mobile version of
the aldweb Site

m.aldweb.com


Neither French, nor English?

Try one of these flags then:
[de] [es] [it] [pt]
Search




Weather / Spam / www

Lyon Weather


aldweb against spam


Newsletter
To receive news about this website, consider subscribing to our Newsletter.
Subscribe
Unsubscribe
298 Subscribers
Family's web sites

Webmaster - Infos
Friends News
Visits

   visitors

   visitors online

Poll
What do you think of the new design of the aldweb Site?
 
Great !
Beautiful
Average
So ugly...
Results
forum.gifForum - iziBasic - Topic #1001

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

active  Topic # 1001  Negative number display problem

03/12/2004 @ 21:13
by Chuck

Anonymous



Negative numbers between 0.0 and -1.0 do not display with a minus sign. All negative numbers greater than or equal to -1.0 display properly. The following code will show the problem:
P=0.45
N=-0.67
N$­­="P= " + STR$­­(P,2)
N$­­=N$­­+" N= "+STR$­­(N,2)
I=MESSAGEBOX(N$­­,1)
Both P and N will show as positive numbers on screen. All calculations seem to operate properly. It is just a display issue. UPDATEFIELD has the same display problem.

Any ideas?
  Post an answer  Top

[]   


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1
--------
03/12/2004 @ 21:40
by Chuck

Anonymous

visitor
In thinking about this some more, the STR$­­ function was common to all of my display problems. I suspect that the STR$­­ function is the source of the issue.
  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2
--------
03/12/2004 @ 22:48
by aldweb

Anonymous

visitor
Hi Chuck,

I will check the STR$­­ function. Indeed, I think that I only tested it with positive numbers!
You are going to be nominated Top iziBasic Bug Finder, together with our friend gmigueis!

But, for the NUMFIELD, it is normal that it accepts only positive values, this is a Palm OS restriction, not an iziBasic one...


@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3
--------
05/12/2004 @ 05:49
by Chuck

Anonymous

visitor
While NUMFIELD does not allow entry of negative numbers, it does display them just fine when I use the UPDATEFIELD command.
  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4
--------
05/12/2004 @ 12:54
by aldweb

Anonymous

visitor
OK, Chuck, good point for you and I might very well be wrong then!
I will check the overall running of this NUMFIELD object.


@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 5
--------
05/12/2004 @ 16:56
by Chuck

Anonymous

visitor
Just to be clear, I have displayed negative numbers in a numfield, but I have never tried reading them back from the screen. It may indeed have the same limitation as entering negative numbers from the graffiti pad.

In my application, the negative numbers are a baseline credit that is not allowed to be changed. I display them, but ignore changes, so I don't know what would happen if I read them back from a NUMFIELD.
  Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 6
--------
05/12/2004 @ 20:59
by aldweb

Anonymous

visitor
Hi Chuck,

I've tested and would you be so kind to tell me if you confirm my findings.

[-1.0] works fine with me.
So, I believe that the problem only occurs with [-0.xx] values!
And also when doing STR$­­(A,n) with n>=0 (if n<0, display is correct).

Now, I have to dig into the source code of iziBasic...


As for the NUMFIELD issue, here is a copy & paste of Palm OS API doc:
If checked, only the characters 0 through 9 and associated separators are allowed to be entered in the field. The associated separators are the thousands separator and the decimal character. The values of these two characters depend on the settings in the Formats prefs panel.

So, it seems that the minus sign really is not taken into account when the user keys in one number, as I thought until now.
And your own test have proven that someone could force displaying a minus sign in a field anyway! But it has to be by programming...

Cheers,

@+
aldweb
Write to aldweb   Post an answer  Top

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 7
--------
06/12/2004 @ 15:51
by Chuck

Anonymous

visitor
You are correct that the problem is only with -0.xx values. My application is using money values, so it is always STR$­­(A,2)
  Post an answer  Top
active topic active   closed topic closed   Sticky Sticky   New New message   -   Correct Correct message   Close Close topic   Make sticky Make sticky
[]
Forum Topic  Forum 



 
^ Top ^