COMPUTE / ADD
Performs calculations.
Syntax
COMPUTE R = a + b. · ADD a TO b.
Description
COMPUTE calculates with formulas (* / + - ** ). ADD/SUBTRACT/MULTIPLY/DIVIDE are separate statements. The result is written to a variable.
Example
Loading editor…
Expected output
7
When to use?
Calculations.