November 2019
Beginner to intermediate
674 pages
15h
English
The standard logical operators and, or, xor, and not have an additional hidden side in Delphi. We can also use them to perform operations on individual bits of a number. Besides being logical operators, they also function as bitwise (bit by bit) operators.
The meaning of an operator, for example, and, is automatically detected from the context. When the compiler encounters a code like a and b and both a and b are Boolean variables (or expressions), and is compiled to a logical operator. If a and b are both an integer (or word or NativeUInt, or any other integer type), and is compiled to a bitwise operator. If a is an integer and b is a boolean, the compiler reports an error.
Read now
Unlock full access