or

From RAD Studio
Jump to: navigation, search

Go Up to Keywords, Alphabetical Listing Index


Category

Alternative Representations of Tokens (C++), Operators (C++)

Syntax

Description

The or operator is an alternative representation of the || operator ( logical OR).

Only two statements can be evaluated at a time.

or returns true if two values are different, such as 2 or 6.

or returns false if both values are the same, such as 10 and 10.

In order to use the or operator, you need to check the Enable new operator names option (the -VM compiler switch, available on the Compatibility page of the Project > Options dialog box).