Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Between or not between. That is the question.
Message
De
24/07/2000 22:00:13
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00396297
Message ID:
00396446
Vues:
8
Charles,

>betw(50, 1, 100) = TRUE
>betw(50, 100, 1) = FALSE
>betw(-1, 0,-100) = FALSE (this is what got me since I was using variables) => Between (adjust_amount,0,due_amount) should be valid but wasn't. The fix is easy, but it got me.

Good one. That's the kind of logic error that is often hard to track down -- when the data falls outside of the range that the programmer had in mind.

So, we need to remember that the second parameter represents the LOW value, and the third the HIGH value.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform