I know I shouldn't, .....
<snip>
I just couldn't help my self....
Don't do what I do, do what they say ! 
One could also create a haslist for all commands allowed, then do a binary search in the hashlist?
Or use nested case statements.
Say we have 3 commands: Help, Halt, Install:
case Command[1] of
'H': case Command[2] of
'E': case Command[3] of etc. etc.
'A':
else //code for wrong input here
end;
'I': case Command[2] of
'N': case Command[3] of etc.etc.
else //code for wrong input here
end;
else //code for wrong input here
end;
(I actually once wrote such piece of code with nested case statements to decode codons (3 successive letters (array[1..3] of char), coding for an amino-acid), where this approach proved to be faster then any other alternative anyone else came up with.)
Bart