aldweb

Fermer I. aldweb

Fermer II. Gratuitiels PC

Fermer III. Gratuitiels Palm

Fermer IV. Partagiciels Palm

Fermer V. iziBasic Palm

Fermer VI. Connaissance Palm

Fermer VII. Ordinateur Poche

Fermer VIII. miniPortail

Spécial !



Version mobile
de l'aldweb Site

m.aldweb.com


Ni Français, ni Anglais ?

Essayez donc l'un de ces drapeaux :
[de] [es] [it] [pt]
Recherche




Météo / Spam / www

Météo Lyon


aldweb contre le SPAM


Newsletter
Pour avoir des nouvelles de ce site, inscrivez-vous à notre Newsletter.
S'abonner
Se désabonner
298 Abonnés
Sites web de la famille

Webmaster - Infos
News Amis
Visites

   visiteurs

   visiteurs en ligne

Sondage
Comment trouve-tu le nouvel habillage de l'aldweb Site ?
 
Superbe !
Joli
Moyen
Moche...
Résultats
forum.gifForum - iziBasic - Sujet n°1001

Forum - Forum
iziBasic - iziBasic


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

actif  Sujet n° 1001  Negative number display problem

le 03/12/2004 @ 21:13
par Chuck

Anonyme



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?
  Poster une réponse  Haut

[]   


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

Anonyme

visiteur
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.
  Poster une réponse  Haut

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

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut

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

Anonyme

visiteur
While NUMFIELD does not allow entry of negative numbers, it does display them just fine when I use the UPDATEFIELD command.
  Poster une réponse  Haut

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

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut

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

Anonyme

visiteur
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.
  Poster une réponse  Haut

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

Anonyme

visiteur
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
Ecrire à aldweb   Poster une réponse  Haut

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

Anonyme

visiteur
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)
  Poster une réponse  Haut
actif sujet actif   clos sujet clos   Important! Important!   Nouveau Nouveau message   -   Rectifier Rectifier message   Clôturer Clôturer sujet   Remonter Remonter
[]
Catégories de discussion  Forum 



 
^ Haut ^