Well, again.
yes, again you're wrong. you got the consistency part, that's good.
The operators' behavior will not change — the compiler would still decide on the choice of a logical or bitwise operator based on the context, nothing changes here.
There is plenty that changes. For instance:
var
AnInteger = 7;
AnotherInteger = 5;
..
SomeVar = 1;
if AnInteger and AnotherInteger = SomeVar then....
There is no way for the compiler to decide, with context or otherwise, what it should do. It could interpret that statement as
true and
true =
true which would be
true or it could just as well interpret it as a bitwise operation compared to the numeral 1,
111 and
101 =
1 which would be
false. As I stated in the previous post, that's why C and C++ use a different operator, that's what allows those compilers to distinguish between such cases.
So if the calculated result of the expression is not a typical boolean, then it should be checked if it is ordinal type and if so, convert to boolean (or not and test it just as a number), and if not, return the compilation error.
That's a mess. Any pile of bits, as long as they fit in a CPU register, can be an ordinal.
The overhead of testing the tyle of the final value of the expression in this case must exist, but there is no case where the compiler would not be able to determine whether the implicit conversion is to take place or not. And the operators used in the expression have no meaning here.
Why do you think C and C++ have different operators for logical and binary operations ? they are not Christmas ornaments, they are needed to disambiguate expressions that would otherwise be undecidable.
False and True values are a human invention and Pascal-specific — for the processor everything is just numbers.
The names we choose to give to identify states are a human invention but the states aren't. The words "green" and "blue" are human "inventions" but the wavelengths they identify (in this case, rather imprecisely) are not. And, for the record, processors know nothing about numbers, all they know about is two states (which we call true and false). At the circuit level, everything is done with logical operations on two states.