In some pseudocode, I saw the following:

if w in [1..5,8,11]

Does it mean that if w is from 1 to 5 or 8 or 11? Or is it something else?


Yes, that's how I'd interpret that. That's not just pseudocode; it's actually valid code in Pascal, exactly as written.


It means "if W is 1, 2, 3, 4, 5, 8, or 11".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.