Aug 13, 2004 #1 lpb71 Technical User Mar 10, 2004 57 GB I need help creating part of my script. I want it to generate a random number between 245 and 254 then pipe this mumber into a string value Any help would be greatly appreciated.
I need help creating part of my script. I want it to generate a random number between 245 and 254 then pipe this mumber into a string value Any help would be greatly appreciated.
Aug 14, 2004 1 #2 qbasicking Programmer Aug 19, 2001 628 US Well, from 245 inclusive to 254 exclusive is 9, so: a = RND * 9 a = a + 245 a$ = STR$(a) 'convert to a string Upvote 0 Downvote
Well, from 245 inclusive to 254 exclusive is 9, so: a = RND * 9 a = a + 245 a$ = STR$(a) 'convert to a string
Aug 17, 2004 Thread starter #3 lpb71 Technical User Mar 10, 2004 57 GB Tried this, it generates number 251 all the time. Any further ideas ?. Thanks. Upvote 0 Downvote
Aug 20, 2004 #4 qbasicking Programmer Aug 19, 2001 628 US RANDOMIZE TIMER a = RND * 9 a = a + 245 a$ = STR$(a) Upvote 0 Downvote