Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Syntax for IF STATEMENTS
Message
 
 
À
04/02/2003 21:00:05
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00749162
Message ID:
00749338
Vues:
21
>The correct version is as follows:
>
>
>if age >= 55 and age < 65
>
>
>An expression like age >= 55 and age < = 65 can be simplified as between(age, 55, 65), but no equivalent simplification exists if one side uses greater-or-equal, and the other side only less-than, for instance.
>
>HTH, Hilmar.

Well, in this particular case
between(age,55,64)
would work...

In other cases, you have to know the precision of the value, you're checking.

Say, if age field would be N (5,2) it would be safe to write:

between(age,55,64.99)

If you don't know the precision, you must use < and >= notation or pick up lots of decimals... (like 64.99999999999999999) - it may not work yet...
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform