Minimum
ActionStep Reference » Programming » Number Operation » Comparison » Minimum
The ActionStep Minimum retrieves the lowest value after comparing two numbers 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 Comparison node, select the Minimum 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] |
Number 1
|
The first number to be compared
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Number 2
|
The second number to be compared
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter, Enum] |
Results:
The ActionStep returns the following results:
NAME
|
DESCRIPTION
|
---|---|
Result |
Contains the lowest value after comparing the two numbers
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Types [Variable, Parameter] |
The number type set in the ActionStep Minimum determines the data type of its Result even if the variables and/or parameters that were set for the numbers 1 and 2 are of different data types. |
Example 1 (Determines the lowest sales):
This example compares the value of Sales Q1 and Sales Q2 variables with a Floating Point data type. The Minimum ActionStep retrieves the number with the smaller value. The result of comparing the two numbers is then output via the Message Box.