- Equals (computing)
Equals (=), in
computing , is asymbol that is used in severalprogramming language s.Names
The equals sign is
ASCII character 61, and has multiple names that are commonly used. These include "ITU-T", "equals", "gets", and "takes". Although less commonly used, "quadrathorpe", "INTERCAL", and "half-mesh" are acceptable.Programming
The equal sign is used in many
programming language s, such as BASIC and C as theassignment operator .Other languages, such as Ada and Pascal, use variants such as
:=
("becomes equal to") to avoid upsetting mathematicians with statements such as "x = x+1" (and to avoid common typos in comparisons that can happen in languages that consider assignment to be an operator that may be used anywhere in an expression. e.g., the=
–=
confusion in C). In these languages the:=
is "not" considered an operator and may only occur between the variable and the expression of the assignment.This sign is also used by itself, and in compounds such as
<=
,>=
,=
,/=
,!=
for variousrelational operator s, and in C's+=
,*=
etc. which mimic the primitive operations oftwo-address code .Operators
Many languages have different equality predicates, operators which test the equality of values. For instance,
Perl has the numerical equality operator=
and the string equality operatoreq
.Equality is a property of values, not objects. An operator which asks if two variables refer to the same data object is an "identity" predicate, such as Python's
is
orCommon Lisp 'sEQ
.ee also
*
Character (computing)
Wikimedia Foundation. 2010.