Сравнение версий

Ключ

  • Эта строка добавлена.
  • Эта строка удалена.
  • Изменено форматирование.

...

Returns True if the first operand is greater than the second operand. Otherwise False.

Action icon

Image Modified

Settings of parameters

PropertyDescriptionTypeFilling exampleMandatory field
Parameters
First operandValue or variable of the first opreandRobin.Numeric
Yes
Second operandValue or variable of the second opreandRobin.Numeric
Yes
Results
ResultThe result of the comparison, true if the first number is greater than the other, false otherwise.Robin.Booleantrue

Special conditions of use

None.

Example of use 

Task

There is "Variable1" with value = 17 and "Variable2" with value = 3. It is required to check the expression Variable1>Variable2. If the result is positive, output a dialog box with a message - true, if the result is negative, output a dialog box with a message - false. 

Solution

Use the actions "Greater than", "If", "Show message". 

Implementation

  1. Assemble a robot scheme consisting of actions:
    Image Modified
  2. Create a variable with the boolean type "Variable3" to record the result of the "Greater than" action into it. 
    Image Modified
  3. Move the "Greater than" action to the workspace and set its parameters. 
    Image Modified
  4. Move the "If" action to the workspace and set the action parameter to "Variable3". 
    Image Modified
  5. In the "True" branch, add the "Show message" action and set its parameters.
    Image Modified
  6. In the "False" branch, add the "Show message" action and set its parameters.
    Image Modified
  7. Launch the robot using the "Start" button and the top panel. 

Result

The comparison of variable values has been performed successfully, the dialog box with the result is displayed 

...