XenoGuard 4.0 Documentation

Subtract

ActionStep Reference » Programming » Number Operation » Basic » Subtract 

The ActionStep Subtract calculates the difference between two numbers and stores the difference in Result under the Result List. The following number types are allowed for this number operation: 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 Subtract ActionStep.

Parameters:

The ActionStep has the following input parameters:


name Description
Number Type
Specifies the data type to be used for the numbers to be subtracted and its result.

Allowed Context Scope
 [Fixed]
Allowed Values [Floating Point, Signed Number, Unsigned Number]
Minuend
The value which another value (subtrahend) will be subtracted from.

Allowed Context Scopes
[Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Subtrahend
The value to be subtracted from another value (minuend).

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

Results:

The ActionStep returns the following results:

name
description
Result Contains the difference of the two numbers.

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

Warning The number type set in the ActionStep Subtract determines the data type of its Result even if the variables and/or parameters that were set for minuend and subtrahend are of different data types.

Example 1 (Subtracting two floating point variables):

This example subtracts the contents of two local variables, the Item Price and Discount Amount. Both variables use the data type Floating Point. The result of subtracting the two numbers will be output into the Speech Output.


See other Basic operations:

Add
Multiplicate
Divide
Modulo
Power
Root
Increment
Decrement
Random