Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 9 down vote accepted

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

share|improve this answer
Thank you for clarifying this – Saras Apr 6 '13 at 17:30

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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