Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uupsi!cmcl2!adm!news From: ZCCBJSB%EB0UB011.BITNET@cunyvm.cuny.edu (Josep Sau B.) Newsgroups: comp.lang.pascal Subject: Syntax of 'in' Message-ID: <26696@adm.brl.mil> Date: 29 Apr 91 19:48:20 GMT Sender: news@adm.brl.mil Lines: 24 >> i fiddled, i faddled, i fuddled and then i posted a message for help. >> of course after posting i decide to try ONE LAST THING, which was: >> repeat while upcase(key) not in ['A','B','H','W']; > What you probably saw was a set constructed as follows: > LetSetType = ['A'..'Z']; > Or something similar to that. This type of set will only work with > a contiguous subrange of a larger set. Any char set constant may be used there, be it a contiguous range or not. I think the problem is the syntax of the 'IN' operator. It takes two operands: the one in the left must be an ordinal, and the one in the right a set of the same base type. Try using: repeat until (upcase(key) in (.'A','B','H','W'.); Moreover, the construct 'repeat... while...' is illegal in Pascal. A REPEAT always matches an UNTIL, not a WHILE, and the loop is exited if the condition is TRUE. -- Josep Sau