Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET POINT and numeric input
Message
De
11/01/2002 07:42:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00603396
Message ID:
00603409
Vues:
25
>Here in Holland we have the similar with our notation of 1.000.000,25
>"In the beginning" I tried to solve this and gave up;
>VFP seemed to give more opportunities and I tried it again to no avail.
>
>Right now I am not really sure anymore what the anomalies were, but they are there; the comments in the according program here state that there are (will be) all kind of problems with the typing of numerical controls.
>But maybe I didn't find the right combination.

I already considered one potential problem converting all points to commas, namely, that for some textboxes a point will be valid. So, for a global solution, I will have to do some checking, probably with type(). Another check is that the user, indeed, uses commas for decimals. Remember, I "respect user preferences" with SET SYSFORMATS. The quotations marks mean that the user may not even be aware of "his preferences".

I can also imagine the cursor jumping around in the field, when you try to intercept the keyboard.

Giving users liberty with SET SYSFORMATS has other problems, too; for instance, in reports, I noticed that dates may print with either 8 or 10 characters, depending on whether the user included "yy" or "yyyy" in the date setting. This can affect alignment on some reports (especially the text reports that I basically generate with "?" and "??").

OK, thank you for the reply. I will do a few tests and inform you if I find a solution.

>The controls for input never have the thousand separator in them, and always the dot for the decimal separator; there was not any complaint so far because -again- somehow overhere we do like to type the dot (but strangely we can't read it back like that).

Does that mean that you use SET POINT TO "." for forms, and SET POINT TO whatever_the_user_prefers for reports?

>I'm not sure how your situation is (and why the control panes defines as is), but maybe this helps a little.

Officially, in Bolivia, the separators are defined as in Koninkrijk der Nederlanden. Unofficially, there is a lot of confusion. Many people use a point for decimals. Probably this is due to the influence of the United States, and of calculaters and computers (also from the U.S.). OTOH, any Latin American Windows installation would default to the equivalent of SET POINT TO ",".

Met hartelijke groeten,

Hilmar.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform