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

Ключ

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

"<"

...

Less than Version 5 (Java)

Группа действийAction group: ОператорыOperators

...

ОписаниеDescription

Возвращает True, если первый операнд меньше второго. Иначе Returns True if the first operand is less than the second operand. Otherwise False.

...

Action icon

Image Modified

Параметры действия

Входные параметры

Поле "Операнд 1" - Выражение, имеющее результат числового типа или числовая переменная.

Поле "Операнд 2" - Выражение, имеющее результат числового типа или числовая переменная.

Выходные параметры

Поле "Результат" - Переменная логического типа, возвращающая результат действия.

Настройки

...

Свойство

...

Англ. наименование

...

Описание

...

Тип

...

Пример заполнения

...

Обязательность заполнения поля

...

Параметры

...

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 less 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, display a dialog box with a message - correct, if the result is negative, display a dialog box with a message - incorrect. 

Solution

Use the actions "Less than",

Особые условия использования

Отсутствуют.

Пример использования 

Задача

Существует "Variable1" со значением = 17 и "Variable2" со значением = 3. Требуется проверить выражение Variable1<Variable2. При положительном результате вывести диалоговое окно с сообщением - верно, при отрицательном результате с сообщением - неверно. 

Решение

Воспользоваться действиями "Less than",  "If", "Show message". 

Реализация

Implementation

  1. Assemble a robot scheme consisting of actionsСоздать схему:

    Создать переменную с типом логический
  2. Create a variable with the boolean type "Variable3" для записи в нее результата действия to record the result of the "Less than" action into it
    image2024-1-30_17-42-28.png
  3. Перетащить действие "Меньше чем" на рабочую область и настроить его параметрыMove the "Less than" action to the workspace and set its parameters
    Перетащить действие
  4. Move the "If" на рабочую область и указать в параметре действия action to the workspace and set the action parameter to "Variable3". 
  5. В ветвь In the "True" добавить действие branch, add the "Show message" и настроить его параметрыaction and set its parameters.
    В ветвь
  6. In the "False"  добавить действие branch, add the "Show message" и настроить его параметрыaction and set its parameters.
  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 

Image Added

 Image Removed