Compound Assignment - Research Article from World of Computer Science

This encyclopedia article consists of approximately 3 pages of information about Compound Assignment.

Compound Assignment - Research Article from World of Computer Science

This encyclopedia article consists of approximately 3 pages of information about Compound Assignment.
This section contains 725 words
(approx. 3 pages at 300 words per page)
Buy the Compound Assignment Encyclopedia Article

The compound assignment is a form of assignment statement used to perform multiple operations on variables and expressions. An assignment statement assigns a value to a variable, in the form of variable=expression; the expression can be a constant, another variable, or an arithmetic calculation. With compound assignments the equals sign (=), also called the operator, is interpreted by the computer as "takes the value of" in executing the assignment statement, and compound assignment statements are thereby able to perform more than one operation on a variable.

For example, a multiplication assignment operator (*=) is a compound assignment operator used to direct the multiplication of the value of a variable by the value of an expression. The result of this operation is then assigned to the variable (i.e., becomes the new result). The operational sequence (result*=expression) involves any variable or expression and is identical to specifying...

(read more)

This section contains 725 words
(approx. 3 pages at 300 words per page)
Buy the Compound Assignment Encyclopedia Article
Copyrights
Gale
Compound Assignment from Gale. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.