XenoGuard 4.0 Documentation

Truncate

ActionStep Reference » Programming » Number Operation » Float » Truncate

The ActionStep Truncate shortens a number to the nearest integer towards zero and stores the number in Result of the result list. Only the Floating Point data type is allowed.

[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Number Operation node.
  3. In the Float node, select the Truncate ActionStep.

Parameters:

The ActionStep has the following input parameters:


NAME DESCRIPTION
Number Type
Specifies the data type to be used for a number

Allowed Context Scope
 [Fixed]
Allowed Value [Floating Point]
Source
The number to be truncated

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

Results:

The ActionStep returns the following results:


NAME
DESCRIPTION
Result Contains the truncated number

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

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

Example 1 (Rounding a floating point value):

This example truncates the Annual Income variable with a data type of Floating Point. The result of the truncated number is then output via Write Text

See other Float operations:

Round
Ceiling
Absolute
Floor