assignment operator

2 topics · 2 sources

Technology› Programming

Java

The operator (=) used to store the value of an expression into a variable, for instance

 variable = expression; 
The right-hand-side is completely evaluated before the assignment is made. An assignment may, itself, be used as part of an expression. The following assignment statement stores zero into both variables.
 x = y = 0; 

Technology› Programming

Perl

Either a regular "assignment", or a compound "operator" composed of an ordinary assignment and some other operator, that changes the value of a variable in place, that is, relative to its old value. For example, $a += 2 adds 2 to $a.

Cite this definition

APA
MLA
Chicago