Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can this be done using IF Statements?
Message
 
 
À
26/11/2002 23:21:47
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00727403
Message ID:
00727405
Vues:
8
You can use DO CASE statement.
DO CASE
CASE age < 55 
	*use mCode
CASE BETWEEN(age, 55, 64)
	*use code "7B"
CASE BETWEEN(age, 65, 74)
	*use Code "6B"
CASE age = 75
	*use code "1B"
OTHERWISE	
	* age > 75
ENDCASE
>Hi all:
>
>I am trying to code the following but am not sure how to apply the OR and BETWEEN conditions in an IF Statement. Actually, I am not sure whether that can be done itself.
>
>Here goes the psuedocode. Need to determine the following:
>
>
If mCode = "5B" &&then check the age
>     If the age is below 55 then
>          use mCode
>     else
>          If the age is between 55 and 64 then && this is where I don't know the syntax
>               use code "7B"
>     Else
>          if age is between 65 and 74 && and i don't know the syntax
>               use Code "6B"
>     Else
>          if age is > 75
>               use code "1B"
>Endif
>
>Thank you for your advise.
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform