home *** CD-ROM | disk | FTP | other *** search
- ;NComm script that demonstrates the $RAND variable
-
- set $range = "15" ;Generate a random number between 0 and 15
- ;Actual result will be placed in the $newrand variable
-
- main:
- gosub rand
- message "Your lucky number is: "$newrand"\n"
- end
-
- rand: ;To generate a new random number, gosub to this routine
- set $newrange = $range+"1"#
- set $newrand = $rand*$newrange/"65536"#
- return
-