Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.