Random numbers

Just starting out? Need help? Post your questions and find answers here.
ravagepn
User
User
Posts: 10
Joined: Sun Mar 06, 2005 3:54 pm

Random numbers

Post by ravagepn »

I want to program a simple football manager game and I wonder if Pure Basic have support for random numbers ? A litle example of how do I generate them will be appriciated.
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Post by Joakim Christiansen »

You are going to create a football manager and you don't know how to get a random nuber? :lol:

It's all in the help file!
Syntax

Result = Random(Maximum)
Description

Returns a random number between and including 0 and the Maximum value. Additionally RandomSeed() can be used to change the actual seed of random number.

Note: each times a program start, a new seed is generated, so RandomSeed() is only useful when the programmer when always the same random number in the same order.
I like logic, hence I dislike humans but love computers.
Post Reply