Get random number Version 1 (Net)

Action group: Base actions, subgroup: General


Description

The action returns random number

Action icon

Settings of parameters 

Property

Description

Type

Filling example
Mandatory field
Parameters
Minimum

The smallest possible value

Numeric
-18No
Maximum

The largest possible value

Numeric56No
Integer?
If the parameter value is true, then an integer will be generated. Otherwise - any real number in the range [Minimum, Maximum]Boolean
true
No
Results
Result
Generated random number
Numeric



Special conditions of use

None.

Example of use

Task

Generate a random integer from -100 to 50 and display the result in a dialog box.

Solution

Use the "Generate random number" and "Show message" actions. 

Implementation

  1. Move the "Generate a random number" action to the workspace.


  2. Set the parameters of the "Generate random number" action.


  3. Move the "Show message" action to the workspace.


  4. Set the "Show message" action parameter.
    In the "Message text" field add the result of the "Generate random number" action.


  5. Click on the "Start" button in the top panel.  

Result

The program robot completed successfully.
A dialog box with a randomly generated number is displayed.

  • Нет меток