随机数发生器
RANDOM - 生成一个随机数
随机(低,高)
生成低和高之间的伪随机整数
// Example that generates 20 random numbers between 1 and 20 (1 and 20 included)
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DO i = 1 TO 20.
DISPLAY i RANDOM(1, 20).
PAUSE.
END.
RANDOM - 生成一个随机数
随机(低,高)
生成低和高之间的伪随机整数
// Example that generates 20 random numbers between 1 and 20 (1 and 20 included)
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DO i = 1 TO 20.
DISPLAY i RANDOM(1, 20).
PAUSE.
END.