User Tools

Site Tools


operating_assignments.htm
Navigation:  Language Reference > 11 - Assignments > Assignment Statements >====== Operating Assignments ====== Previous pageReturn to chapter overviewNext page

 

destination += source
destination -= source
destination *= source
destination /= source
destination = source
destination %= source

blk2blue.jpg

destination Must be the label of a variable. This may not be a runtime property.
source A constant, variable, procedure, or expression.

Operating assignment statements perform their operation on the destination and source, then assign the result to the destination. Operating assignment statements are more efficient than their functionally equivalent operations.

Example:

Operating Assignment       Functional Equivalent

 A += 1                     A = A + 1

 A -= B                     A = A - B

 A *= -5                    A = A * -5

 A /= 100                   A = A / 100

 A ^= I + 1                 A = A ^ (I + 1)

 A %= 7                     A = A % 7

See Also:

Data Conversion Rules

Property Expressions

operating_assignments.htm.txt · Last modified: 2021/04/15 15:57 (external edit)