"Not Eqv" Inequality Version 3 (Net)
Action group: Operators
Description
Returns True if both operands have different values.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
First operand of boolean type | First operand of boolean type | Robin.Boolean | true | Yes |
Second operand of boolean type | Second operand of boolean type | Robin.Boolean | true | Yes |
Results | ||||
Result | The resulting variable, true if the boolean variables are not equal, false otherwise. | Robin.Boolean | true |
Special conditions of use
None.
Example of use
Task
There is a "Logical variable 1" with value = true and "Logical variable 2" with value = false. We need to check the following expression: Logical Variable 1 is NOT EQUAL to Logical Variable 2. If the result is positive, output a dialog box with a message - true, if the result is negative, the message - false.
Solution
Use the actions "Inequality", "If", "Message".
Implementation
- Assemble a robot scheme consisting of actions:
- Create a variable with type logical "Logical variable 3" to record the result of action "Inequality" into it.
- Move the "Inequality" action to the workspace and set its parameters.
- Move the "If" action to the workspace and specify "Logical variable 3" in the action parameter.
- Add the "Show message" action to the "Truth" branch and set its parameters.
- Add the "Show message" action to the "False" branch and set its parameters.
- Start the robot using the "Start" button and the top panel.
Result
The comparison of variable values has been performed successfully.
A dialog box with the result is displayed.
Обзор
Инструменты контента