XenoGuard 4.0 Documentation

Random

ActionStep Reference » Programming » Number Operation » Basic » Random 

The ActionStep Random generates a number from the given lower and upper limits and stores the random number in Result under the Result List. The following number types are allowed: Signed Number and Unsigned Number.

[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. Open the Number Operation node.
  3. In the Basic node, select the Random ActionStep.

Parameters:

The ActionStep has the following input parameters:


name Description
Number Type
Specifies the data type to be used for the random number.

Allowed Context Scope
 [Fixed]
Allowed Values [Signed Number, Unsigned Number]
Lower
The lowest possible number to be generated.

Allowed Context Scopes
[Fixed, Local, Global]
Allowed Context Types [Variable, Parameter, Enum]
Upper
The highest possible number to be generated

Allowed Context Scopes
 [Fixed, Local, Global] 
Allowed Context Types[Variable, Parameter, Enum]

Results:

The ActionStep returns the following results:

name
description
Result Contains the generated random number.

Allowed Context Scopes [Fixed, Local, Global]
Allowed Context Types [Variable, Parameter]

Warning

The number type set in the ActionStep Random determines the data type of its Result even if the variable or parameter that is set as lower and upper limits is of a different data type.

The lower value must be smaller than the upper value.

Example 1 (Generate a random number from 000001 to 999999):

This example generates a random value from two variables, First Transaction No and Last Transaction No. Both variables use the data type Text. These variables were then set as lower and upper limits of the Random ActionStep. The result of the randomization is then output via the Message Box.

See other Basic operations:

Add
Subtract
Multiplicate
Divide
Modulo
Power
Root
Increment
Decrement