Previous Topic: Set Value of an AccumulatorNext Topic: Decrement an Accumulator


Increment an Accumulator

To increment an accumulator, use the ADD command. The format for an ADD statement is:

ADD accumulator,value

where accumulator is one of ACL/E's accumulators and value is a numeric value to be added to the variable. For example, the following statement increments A3 by 5:

ADD A3,5

You can also increment an accumulator by the value of another accumulator. For example, the following statement increments the value of A3 by the value of A2:

ADD A3,A2

The accumulator that is being incremented must be in the first operand position, so the following statement increments A2 by the value of A3:

ADD A2,A3