Relational Operator

In computer programming languages, a relational operator is a lexical unit used to express a relation, such as equality or greater than, between two expressions. Two suitable expressions combined with a relational operator often form a relational expression or condition in a programming language. For example, in many programming languages, the relational operator that tests the equality of two expressions has this form:
  X == Y 
Relational operators are usually written in infix notation, if supported by the programming language, which means that they appear between their operands (the two expressions being related). However, some programming languages, such as Lisp, use prefix notation, as follows:
  (= X Y) 
Here are some of the most common relational operators in use in programming languages:
big>Common Relational Operators
Relational
Operator !! Meaning
align="center" | == Equality. Used to test the equivalence of two expressions.
align="center" | = Variant of equality.
align="center" | != Inequality. Used to test the equivalence of two expressions.
align="center" | <> Variant of inequality.
align="center" | /= Variant of inequality. This is not as common as the above operator.
align="center" | ^= Variant of inequality. This is not as common as the above operator. (Also a bitwise XOR assignment in C-like languages.)
align="center" | > Greater than. Used to test if the value of the left expression is greater than that of the right expression.
align="center" | < Less than. Used to test if the value of the left expression is less than that of the right expression.
align="center" | >= Greater than or equal to. Used to test if the value of the left expression is greater than or equal to that of the right expression.
align="center" | <= Less than or equal to. Used to test if the value of the left expression is less than or equal to that of the right expression.
align="center" | =< Variant of less than or equal to.

See also

 

<< PreviousWord BrowserNext >>
the fabulous riverboat
n3 eastern bypass (south africa)
daniel, metropolitan of moscow
homotopy sphere
spiral architect
c class destroyer
the dark design
william parker school
voigt profile
peter jairus frigate
my first keyboard
a sceptic's universe
carlos flores
cayman islands national football team
cherry peel
tvbs
photoengraving
the guns of the south
n1 western bypass (south africa)
illinois state route 40
w. r. titterton
provisional confederate congress
authorhouse
josephine silone yates
robbie paul
n12 southern bypass (south africa)
moniza alvi
archbishop of uppsala
stopping rule
ecstasy (1933 movie)
the bird who continues to eat the rabbit's flower
ministry of state security
amrita pritam
weymouth, nova scotia
examilia
illinois state route 6
ectomorphed works
rhodonite
real (album)
software patents under trips agreement
neochori (zacharo), greece
first confederate congress
salt lake city school district
personal software process