Not equal to Version 1 (Java)
Description
The action compares the data type and value of two operands. Returns "True" if the first operand is not equal to the second operand.
Action icon
Parameters
Input parameters
Parameter | Description |
---|---|
Operand 1 | Operand 1 value. |
Operand 2 | Operand 2 value. |
Output parameters
Result - result of comparing two operands.
Settings
Property | Mandatory field | Description | Type | Filling example |
---|---|---|---|---|
Input parameters | ||||
Operand 1 | yes | Operand 1 value | Robin.Object | |
Operand 2 | yes | Operand 2 value | Robin.Object | |
Output parameters | ||||
Result | Result of comparing two operands | Robin.Boolean |
Special conditions of use
The action returns True if the operand data types differ.
The action returns True if the operand data values differ.
The action returns False if the operand data types and values are equal.
Example of use
Example 1
Task
There is a numeric "Variable 1" with value = 7 and a string "Variable 2" with value = 7. Check the expression "Variable 1"≠"Variable 2".
Solution
Use the "Not equal to" action.
Implementation
- Create a variable with numeric type "Variable 1" with value = 7.
- Create a variable with type string "Variable 2" with value = 7.
- Move the "Not equal to" action to the workspace and set its parameters.
- Start the robot by clicking "Start" in the top panel.
Result
The comparison of variable values was successful, the result of the comparison is True.
Example 2
Task
There is a numeric "Variable 1" with value = 7 and a numeric "Variable 2" with value = 9. We need to check the expression "Variable 1"≠"Variable 2".
Solution
Use the "Not equal to" action.
Implementation
- Create a variable with numeric type "Variable 1" with value = 7.
- Create a variable with numeric type "Variable 2" with value = 9.
- Move the "Not equal to" action to the workspace and set its parameters.
- Start the robot by clicking "Start" in the top panel.
Result
The comparison of variable values was successful, the result of the comparison is True.
Example 3
Task
There is a string "Variable 1" with value = "Hello" and a string "Variable 2" with value = "Hello". We need to check the expression "Variable 1"≠"Variable 2".
Solution
Use the "Not equal to" action.
Implementation
- Create a variable with type string "Variable 1" with value = "Hello".
- Create a variable with type string "Variable 2" with value = "Hello".
- Move the "Not equal to" action to the workspace and set its parameters.
- Start the robot by clicking "Start" in the top panel.
Result
The comparison of variable values was successful, the result of the comparison is False.