Random

Prev Next Home Home Table Of Contents Index

Random : Number

The Random command returns random numbers between 0 and +2,147,483,647. (2^31). The algorithm has been checked for good uniformity and takes advantage of re-seeding itself from random events like the timer interrupt and keyboard input.

To get a random number in a specific range, use the Mod command.


Example:
Write 'Pick a Number from 1 to 10 ' Writeln (Random mod 10 + 1)

Category: Math

Prev Next Home Home Table Of Contents Index

Sponsors
Shopping
Forum
Forum
email
EMail
Index
Index
Home
Home