 FACTOID # 8: Bookworms: Vermont has the highest number of high school teachers per capita and third highest number of librarians per capita.

 Home Encyclopedia Statistics States A-Z Flags Maps FAQ About

 WHAT'S NEW

SEARCH ALL

Search encyclopedia, statistics and forums:

(* = Graphable)

Encyclopedia > Relational operator

In computer programming languages, a relational operator symbol or a relational operator name is a lexical or syntactic unit that denotes a relation, for example, equality or greater than, among two or more domains, the members of which are typically denoted by further expressions. Expressions combined by means of a relational operator symbol form what is called a relational expression or a condition. A BlueGene supercomputer cabinet. ... Other listings of programming languages are: Categorical list of programming languages Generational list of programming languages Chronological list of programming languages Note: Esoteric programming languages have been moved to the separate List of esoteric programming languages. ... In mathematics, a finitary relation is defined by one of the formal definitions given below. ... In mathematics, two mathematical objects are considered equal if they are precisely the same in every way. ... The feasible regions of linear programming are defined by a set of inequalities. ... An expression in a programming language is a combination of values and functions or procedures, interpreted according to the particular rules of precedence and of association for a particular programming language, which computes and then returns another value. ...

When there is no risk of confusion, it is common to use the briefer term relational operator to refer to the corresponding symbol or name. Strictly speaking however, the relational operator is not a lexical or syntactic unit but a mathematical object that may be denoted by many different notations.

For example, in many programming languages, the relational operator symbol 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: This article or section does not cite its references or sources. ... In mathematics, an operand is one of the inputs (arguments) of an operator. ... Lisp is a family of computer programming languages with a long history and a distinctive fully-parenthesized syntax. ... It has been suggested that this article or section be merged with Reverse Polish notation. ...

` (= X Y) `

Here are some of the most common relational operators in use in programming languages:

Common Relational Operators
Relational Operator Meaning
== Equality or identity. Used to test the equivalence of two expressions or the identity of two objects.
=== Variant of identity. In some languages (e.g. PHP), represents a stronger sense of equality than ==
= Variant of equality. (Also an assignment operator in C-like languages.)
<> Inequality. (Also a file-search specifier 'operator' in Perl.)
!= Variant of inequality. Used to test the equivalence of two expressions.
/= Variant of inequality. This is not as common as the above operator.
^= Variant of inequality. This is not as common as the above operator. (Also a bitwise XOR assignment in C-like languages.)
> Greater than. Used to test if the value of the left expression is greater than that of the right expression.
< Less than. Used to test if the value of the left expression is less than that of the right expression.
>= 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.
<= 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.
=< Variant of less than or equal to.
!> Less than or equal to. Used in SQL.
!< Greater than or equal to. Used in SQL.

PHP (PHP: Hypertext Preprocessor) is a reflective programming language originally designed for producing dynamic Web pages. ... C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ... Perl is a dynamic programming language created by Larry Wall and first released in 1987. ... Exclusive disjunction (usual symbol xor) is a logical operator that results in true if one of the operands (not both) is true. ... C is a general-purpose, procedural, imperative computer programming language developed in 1972 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system. ... SQL (commonly expanded to Structured Query Language â€” see History for the terms derivation) is the most popular computer language used to create, modify, retrieve and manipulate data from relational database management systems. ... SQL (commonly expanded to Structured Query Language â€” see History for the terms derivation) is the most popular computer language used to create, modify, retrieve and manipulate data from relational database management systems. ...

## Uses outside of programming GA_googleFillSlot("encyclopedia_square");

Relational operators are sometimes used in communities of technical nature instead of words. Results from FactBites:

 Relational operator Summary (763 words) The general form of a relational expression is a (rel-op) b where a and b are operands and rel-op (from relational-operator) generically refers to the various possible relational operators. In computer programming languages, a relational operator symbol or a relational operator name is a lexical or syntactic unit that denotes a relation, for example, equality or greater than, among two or more domains, the members of which are typically denoted by further expressions. 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).
 SGI TPL (IRIX 6.5: Developer/F77_RM - Chapter 3. Expressions) (2379 words) It is composed of a sequence of operands, operators, and parentheses. When the addition operator or the subtraction operator is used with a single operand, the data type of the resulting expression is the same as the data type of the operand. In a character relational expression, e1 and e2 are character expressions and relop is a relational operator.
More results at FactBites »

Share your thoughts, questions and commentary here
Press Releases | Feeds | Contact