主题:急,求救
guozhengbin
[专家分:0] 发布于 2006-07-28 18:35:00
用delphi如何显示出-1到1之间的随机数,谢谢了
回复列表 (共1个回复)
沙发
lcguang [专家分:30] 发布于 2006-07-28 23:03:00
Random generates random numbers within a specified range.
Unit
System
Category
random number routines
function Random [ ( Range: Integer) ];
Description
The Random function returns a random number within the range 0 <= X < Range.
If Range is not specified, the result is a real-type random number within the range
0 <= X < 1.
To initialize the random number generator, call Randomize, or assign a value to the RandSeed variable.
Note
Because the implementation of the Random function may change between compiler versions, we do not recommend using Random for encryption or other purposes that require reproducible sequences of pseudo-random numbers.
我来回复