Source language: Translate to:

Create Random numbers without doubles

NeoBook tips, tricks, code samples and more...

Moderator: Neosoft Support

Create Random numbers without doubles

Postby cipolla » Thu Jan 22, 2004 9:51 am

Hi all,

i needed to create an array of random numbers, lets say 100 numbers from 1 to 1000. If i use the random command i would get double numbers so i have to check if a number was generated before.

I wrote a small code as a subroutine to handle that. and of course i had so much fun to play with that i made a small demo pub.

If someone is interested it could be loaded here:

No additional graphics or plugins needed. It comes with an amazing sound system :-)

There is also a funny lotto demo with some more tricks and code inside.

I placed a lot of declarations inside the code, so it could be usefull for newbees and how knows maybe there is a trick here and there for the old stagers.

If someone has ideas for optimizing some code or find a bug it would be nice to post it.

BTW: Did you find the hidden (cheat) click?

Have fun


Create Random numbers without doubles

Postby domino27 » Thu Jan 22, 2004 10:56 am

Excellent job Cipolla...  (much better than my efforts.. see Anagram Post)... I`m sure I`ll learn quite a bit from this.. even the hidden code perhaps :-)

Create Random numbers without doubles

Postby cipolla » Fri Jan 23, 2004 2:39 am


my topic should have been in another area. i wanted to post it in Sample Pubs.

i could swear i pushed the new topic button there.


Return to NeoBook Knowledgebase

Who is online

Users browsing this forum: No registered users and 1 guest