Re-seeding issue in FB - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: Qbasic "like" compilers/interpreters (http://qbasicnews.com/newforum/forum-5.html) +--- Forum: FB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-15.html) +--- Thread: Re-seeding issue in FB (/thread-6200.html) |
Re-seeding issue in FB - kawageo - 02-23-2005 I am attempting to implement re-seeding technigue. I posted the same at QB in General section. Mac suggested the code as below: Code: CLS It works in QB but not so in FB. Any suggestion? TIA Geo Re-seeding issue in FB - dumbledore - 02-23-2005 here's a fairly simple qb-rnd emulator function that will work with fb. it should be the same as qb's rnd output. (i haven't tested this very much, so watch out...) Code: declare function rnd2#(a as integer=0) Re-seeding issue in FB - dumbledore - 02-23-2005 actually, fb's randomize statement works different that qb's, so you could just say Code: CLS Re-seeding issue in FB - kawageo - 02-23-2005 Thanks, dumbledore! I prefer your second version. The code looks more sense and cleaner than that of QB version. Geo Re-seeding issue in FB - v3cz0r - 02-24-2005 Yeah, as shown at docs/keywords.txt, negative arguments with RND have no means in FB. |