Results 1 to 9 of 9

Thread: [RESOLVED]Help with translation from .NET + explanation

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2006
    Posts
    11

    [RESOLVED]Help with translation from .NET + explanation

    Can anyone please translate this to Classic VB(5)
    VB Code:
    1. Public Sub slumpa()
    2.         j = Int(35 * Rnd() + 1)
    3.         For i = 0 To 6
    4.             Do While Array.IndexOf(lotto, j) > -1
    5.                 j = Int(35 * Rnd() + 1)
    6.             Loop
    7.             lotto(i) = j
    8.         Next i
    And can somebody perhaps explain what the 'Do While Array.IndexOf(lotto, j) > -1' part does (I know that the purpose of the code is to give unique values to the variables in the array, but I don't know what it 'does' more precisely). Thanks a lot
    Last edited by Ruckus_Gary; Nov 27th, 2006 at 11:50 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width