cobolCOMPUTE statement

Remarks

The COMPUTE statement allows for algebraic calculation expressions.

compute statement

Rounded phrase is

rounded phrase

Advice: Use spaces around all components

COMPUTE answer = 3*var-1

That is a reference to the variable var-1, and not var - 1.

COMPUTE answer = 3 * var - 1

Recommended, opinion.