jrgreenman Posted February 9, 2007 Report Share Posted February 9, 2007 Does the Case command support some syntax to check for a range? Something like: Case: 1..5 ...code block 1 Case 6..10 ...code block 2 Quote Link to comment Share on other sites More sharing options...
floyd Posted February 11, 2007 Report Share Posted February 11, 2007 Each Case / End Case is a one-on-one comparison. But, for any End Case command you can have multiple Cases. Your example would work like this: Switch (N1) Case: 1 Case: 2 Case: 3 Case: 4 Case: 5 ... Code block End Case Case: 6 Case: 7 Case: 8 Case: 9 Case: 10 ... Code block End Case End Switch Quote Link to comment Share on other sites More sharing options...
jrgreenman Posted February 11, 2007 Author Report Share Posted February 11, 2007 That's what I was afraid of. I guess it is tolerable in my example of 1..5 and 6..10, but obviously it doesn't scale well. Try 1..1000. Thanks for the clarification though. Quote Link to comment Share on other sites More sharing options...
floyd Posted February 11, 2007 Report Share Posted February 11, 2007 This would work for those larger ranges: If Variable %N1% >= 1 AND If Variable %N1% <= 1000 ... code block End If If Variable %N1% >= 1001 AND If Variable %N1% <= 2000 ... code block End If Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.