Absolute
ActionStep Reference » Programming » Number Operation » Float » Absolute
The ActionStep Absolute returns the positive value of a specified number and stores the number in Result of the result list. The following number types are allowed: Floating Point, Signed Number, and Unsigned Number.
- Open the Programming node in the Workspace Explorer.
- Open the Number Operation node.
- In the Float node, select the Absolute 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 Scopes [Fixed, Local, Global] Allowed Values [Floating Point, Signed Number, Unsigned Number] |
Source
|
The number to be returned with a positive value
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Results:
The ActionStep returns the following results:
NAME
|
DESCRIPTION
|
---|---|
Result |
Contains the absolute number
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter] |
The number type set in the ActionStep Absolute 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 (Converts the negative value to a positive value):
This example subtracts the Start Point and End Point variables. Both variables have a Floating Point data type. The difference of the variables having a negative value was converted to its positive value. The result of the number is then output via Write Text.