IRAND
Return a random number.
WebVue support - Yes.
Syntax
IntVal = IRAND([MinVal, MaxVal]);
Return type: INTEGER.
Argument |
Meaning |
MinVal |
The minimum value for the random number to be returned. Any numeric type. |
MaxVal |
The maximum value for the random number to be returned. Any numeric type. |
Execution
Return: |
A random integer value. If MinVal and MaxVal are not supplied, the value will lie in the range 0 to 32767. |
Example
SUB Main()
DIM intRandValue as integer;
intRandValue = IRAND();
PRINT(intRandValue);
intRandValue = IRAND(0,10);
PRINT(intRandValue);
END SUB