XenoGuard Documentation

Decrement

Actions » Programming » Number Operation » Basic » Decrement 

The action Decrement decreases the value of a number by 1 and stores the value in Result under the Result List. The following number types are allowed: Floating Point, Signed Number, and Unsigned Number.



[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Number Operation node.
  3. In the Basic node, select the Decrement action.

Parameters:

The action has the following input parameters:


name Description
Number Type
Specifies the data type to be used for the decremented number.

Allowed Context Scope
 [Fixed]
Allowed Values [Floating Point, Signed Number, Unsigned Number]
Identifier
The number to be decremented.

Allowed Context Scopes
[Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]

Results:

The action returns the following results:


name
description
Result Contains the number decremented by 1.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]

Warning The number type set in the action Decrement determines the data type of its Result even if the variable or parameter that is set as an identifier is of a different data type.

Example 1 (Decreases the value of a variable by 1):

This example decreases the value of the local variable Temperature that uses the data type Number (signed). The result of the decremented variable is then output via the Write Text.

See other basic operations:

Add
Subtract
Multiplicate
Divide
Modulo
Power
Root
Increment
Random