rand

NAME

rand - retrieve the next pseudorandom number

SYNOPSIS

rand EXPR

rand

DESCRIPTION

Returns a random fractional number between 0 and the value of EXPR. (EXPR should be positive.) If EXPR is omitted, returns a value between 0 and 1. This function produces repeatable sequences unless srand() is invoked. See also srand() .

(Note: if your rand function consistently returns numbers that are too large or too small, then your version of Perl was probably compiled with the wrong number of RANDBITS. As a workaround, you can usually multiply EXPR by the correct power of 2 to get the range you want. This will make your script unportable, however. It's better to recompile if you can.)

电话: 0086-0577-62319278, 62319276       传真: 0086-0577-62319276
网址: Http://www.chinaipp.com  电子邮件: info@chinaipp.com
1998, 1999 中国虚拟主机服务网版权所有 CHINAIPP©