18.08.2013 Views

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

LINC Programming Reference Manual - Public Support Login - Unisys

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

SUBTRACT (SB)<br />

Syntax<br />

Example<br />

<strong>Reference</strong>s<br />

SUBTRACT (SB)<br />

The SUBTRACT; command subtracts the first value from the value in the second data item<br />

and stores the result in the second data item, or in a third data item if one is explicitly<br />

specified by the GIVING; command option.<br />

The GIVING; and ROUNDED; command options can be included with the SUBTRACT;<br />

command.<br />

The System Data item GLB.STATUS is not updated by the SUBTRACT; command. Use the<br />

GLB.STATUS; command to test for arithmetic overflow.<br />

DD DDD DDD DDDDDD <br />

DDBDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDBDDBDDDDDDDDDDDDDDBDDD4<br />

3 3 3 3<br />

@DD DD DDY @DD DDY<br />

numeric data 1<br />

A numeric data item or literal giving the value to be subtracted.<br />

numeric data 2<br />

A numeric data item containing the value to be subtracted from. If the GIVING; command<br />

option is not specified, the result is stored in this data item. (If it is specified, this data item<br />

is unchanged.) This can be a literal only if the GIVING; command option is used.<br />

GIVING; numeric data 3<br />

The GIVING; command option directs the result to the specified data item. The GIVING;<br />

command option must be on the same line as the SUBTRACT; command. GIV is a valid<br />

abbreviation for GIVING. If it is not included, the result is stored in numeric data 2.<br />

ROUNDED;<br />

This command option specifies that the result is to be rounded (rather than truncated).<br />

<br />

<br />

‘‘GLB.STATUS (GS)’’ for directing the value of GLB.STATUS to a data item.<br />

v 1-247

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!