increment, decrement

action

Syntax
decrement name indexer? (by numeric-expression)?
increment name indexer? (by numeric-expression)?
    


Purpose

increment increases the value of an integer by a specified amount. If no amount is specified, increment increases the value of the integer by 1:

  process
     local integer i initial { 10 }
  
     increment i      ; i = 11
     increment i by 3 ; i = 14
          

decrement decreases the value of an integer by a specified amount. If no amount is specified, decrement decreases the value of the integer by 1.

  process
     local integer i initial { 10 }
  
     decrement i      ; i = 9
     decrement i by 3 ; i = 6

Related Concepts