Announcement
Collapse
No announcement yet.
Select Case with AND ?
Collapse
X
-
No with that syntax, but you can use:
Code:Select Case X Case 71 TO 99 Res$="PASS! Congratulations!! Case 1 TO 70 Res$="FLUNKO! Go to teacher for punishment!" Case < 1 Res$="Report to office. You are being sent back a grade." End Select
Leave a comment:
-
Select Case with AND ?
I am aware that I can do this:
I am going to be a plain about this for clarity.
(Assume Grade = 8)
I know I can do this:
Select Case GradeCase 2, 4, 6, 8Res$="EVEN"Case 1, 3, 5, 7End selectRes$="ODD"
Print Res$
End
That is, when a CASE clause contains multiple tests separated by commas, the logical OR is performed. Question: Can I make a SELECT CASE statement using the logical AND?? I.e., can I do this:?
Assume X = 75
Select Case XCase >70, AND <100Res$="PASS! Congratulations!!Case >0, AND < 71Res$="FLUNKO! Go to teacher for punishment!"Case < 1End SelectRes$="Report to office. You are being sent back a grade."
Print Res$
Is that possible?
Thank you.
RobertTags: None
Leave a comment: