tags:

views:

27

answers:

1

Hey,

I'm new here so sorry if I do something wrong!

I'm making a simple Pascal program in Lazarus and I'm getting this error when compiling:

HWE(16,18) Error: Operation "or" not supported for types "Char" and "Constant String"

Here is the part it's complaining about:

Repeat
begin
Readln(style);
If style <> ('e' or 'mp' or 'sa') then
Writeln ('do what I say!')
end
Until style = (e or mp or sa); 

Thanks for any help!

+4  A: 

or has to be used with Boolean expressions, like

(style <> 'e') or (style <> 'mp') or (style <> 'sa')
dan04
Wow, thanks! that works!
Mark Breweton