"-" Subtraction Version 6 (Java)
Action group: Operators
Description
The action is designed to get the difference of two numbers.
Action icon
Settings of parameters
Property | Description | Type | Filling example | Mandatory field |
Parameters | ||||
First operand | Minuend | Robin.Numeric | Yes | |
Second operand | Subtrahend | Robin.Numeric | Yes | |
Results | ||||
Result | The result of subtracting one number from another | Robin.Numeric |
Special conditions of use
None.
Example of use
Task
There is "Variable 1" with value 8 and "Variable 2" with value 2. It is required to find out the difference of two numbers written to these variables (Variable 1 - Variable 2), write the result to a numeric variable and display the obtained number in a dialog box.
Solution
Use the "Subtraction" and "Show message" actions.
Implementation
- Assemble a robot scheme consisting of actions:
- Create a numeric variable "Variable 3" into which the result of the "Subtraction" action will be written.
- Move the "Subtraction" action to the workspace and set its parameters.
- Move the "Show message" action to the workspace and set its parameters.
- Start the robot using the "Start" button in the top panel.
Result
A dialog box with the total value is displayed on the screen.
Обзор
Инструменты контента