I know that OR is an operator for Boolean operands. But when I use it with numbers I get surprising and unexpected results instead of an error. For example:
program test;
uses crt;
begin
clrscr;
writeln(1 or 2);
writeln(2 or 14);
readln;
end.
outputs
3
14
I cannot understand why 1 OR 2 equals 3, and why 2 OR 14 equals 14... Someone explains please.