You are comparing the value of MainMenuChoice
to the value created by OR
'ing the bits of the three test values together, which produces 11. So your code is actually doing this:
Until MainMenuChoice = 11;
To compare it again the three individual values, use a Set instead:
Until MainMenuChoice in [1, 2, 9];
However, assuming MainMenuChoice
is a Char
then Readln()
is going to return the character that the user actually typed, not its numeric value, so use this instead:
Until MainMenuChoice in ['1', '2', '9'];