Randomization problem

David McFarlane mcfarla9 at msu.edu
Mon May 18 18:59:28 UTC 2009


Adam,

Hmm, that bit of code works perfectly for me.  I suspect the problem 
lies somewhere else in the script.  Just to be clear, try the 
following and see what happens:

Dim drawno As Integer
Dim i as Integer
For i = 1 to 8
     drawno = Random(0, 7)
     MsgBox drawno
Next i

-- David McFarlane, Professional Faultfinder


>I'm having a little problem with randomization code in Ebasic. I 
>have this code:
>
>Dim drawno As Integer
>drawno = Random(0, 7)
>
>...and yet, drawno is initialized to '0' every time. This code is 
>used for 8 repetitions in the program, and each time "0" comes up. 
>Even with "Randomize" in front, the same thing happens.
>
>Is there something I'm doing wrong?
>
>Adam


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en
-~----------~----~----~----~------~----~------~--~---



More information about the Eprime mailing list