::Relational operator
::concepts
{{ safesubst:#invoke:Unsubst||$N=Use mdy dates |date=__DATE__ |$B=
}}
In computer science, a relational operator is a programming language construct or operator that tests or defines some kind of relation between two entities. These include numerical equality (e.g., 5 = 5) and inequalities (e.g., 4 ≥ 3).
In programming languages that include a distinct boolean data type in their type system, like Pascal, Ada or Java, these operators usually evaluate to true or false, depending on whether the conditional relationship between the two operands holds or not. In languages such as C, relational operators return the integers 0 or 1, where 0 stands for false and any nonzero value stands for true.
An expression created using a relational operator forms what is known as a relational expression or a condition. Relational operators can be seen as special cases of logical predicates.
Relational operator sections
Intro Equality Ordering Logical equivalence Standard relational operators Syntax See also Notes and references
PREVIOUS: Intro | NEXT: Equality |
<< | >> |
Language::equality Equal::operator Value::types Group::objects Which::pascal Other::would
{{ safesubst:#invoke:Unsubst||$N=Use mdy dates |date=__DATE__ |$B=
}}
In computer science, a relational operator is a programming language construct or operator that tests or defines some kind of relation between two entities. These include numerical equality (e.g., 5 = 5) and inequalities (e.g., 4 ≥ 3).
In programming languages that include a distinct boolean data type in their type system, like Pascal, Ada or Java, these operators usually evaluate to true or false, depending on whether the conditional relationship between the two operands holds or not. In languages such as C, relational operators return the integers 0 or 1, where 0 stands for false and any nonzero value stands for true.
An expression created using a relational operator forms what is known as a relational expression or a condition. Relational operators can be seen as special cases of logical predicates.
Relational operator sections
Intro Equality Ordering Logical equivalence Standard relational operators Syntax See also Notes and references
PREVIOUS: Intro | NEXT: Equality |
<< | >> |