Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can this be done using IF Statements?
Message
 
 
To
26/11/2002 23:21:47
Henry Ravichander
RC Management Systems Inc.
Saskatchewan, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00727403
Message ID:
00727405
Views:
7
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform