Proc Reference > PQN Proc Commands > -

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

- command (Proc) (m618403+minus.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

-

Subtracts an integer from the current parameter in the active input buffer.

Syntax

-n

Syntax Elements

n is the integer to be subtracted.

Operation

The – command subtracts the integer specified by n from the current parameter in the active input buffer.

If the number of characters within a parameter decreases after a - command, the result is loaded with leading zeros to maintain the same number of characters as the previous value.

Parameters within the input buffer can be preceded by a minus sign.

If the buffer pointer is at the end of the buffer, a new parameter is created by the - command.

If the referenced parameter is nonnumeric, a zero is used.

Example 1

Command PIB Before PIB After
-100 ABC^123^456
   
ABC^023^456
   

Example 2

001 PQN
002 OENTER A NUMBER+
003 S6
004 IBP
005 +3
006 T %6
007 -1
008 T %6
009 RTN

This example receives input from the terminal and places it in the 6th parameter of the primary input buffer. It adds 3 to the value stored in the 6th attribute and displays the result. It then subtracts 1 from the result and displays the new value.

RealityV15.0Comment on this topic