This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
-
OnFire
- Voice
- Posts: 23
- Joined: Tue Oct 01, 2002 1:51 pm
Post
by OnFire »
How can I make a string be a random number?
I think it's got something to do with arrays, but all tcl-commands.doc says isn't good enough!
Cheers
-
Papillon
- Owner
- Posts: 724
- Joined: Fri Feb 15, 2002 8:00 pm
- Location: *.no
Post
by Papillon »
set string to a number between 1 and 1000
Elen sila lúmenn' omentielvo
-
egghead
- Master
- Posts: 481
- Joined: Mon Oct 29, 2001 8:00 pm
-
Contact:
Post
by egghead »
Papillon wrote:
set string to a number between 1 and 1000
rand <limit>
returns: a random integer between 0 and limit-1
-
Papillon
- Owner
- Posts: 724
- Joined: Fri Feb 15, 2002 8:00 pm
- Location: *.no
Post
by Papillon »
ooops
I knew it was - or + 1 somewhere in there ..... didn't have the time check which it was... guess I picked the wrong one

Elen sila lúmenn' omentielvo