Results 1 to 3 of 3

Thread: check it out

  1. #1

    Thread Starter
    Lively Member moonguy's Avatar
    Join Date
    Apr 2001
    Location
    pune(india)
    Posts
    67

    Cool check it out

    hey all,
    i want u to test the Active X exe which uses the algorithm of giving out perfectly random nos in a set. u can dload it from my
    homepage
    |
    |
    Vishal Mungi
    [email protected]
    www.geocities.com/vishalmungi

    VB,ASP,C++,Java,Oracle,MAX,photoshop,XML..,


    ~~~~
    \ - - /

  2. #2
    Hyperactive Member DavidHooper's Avatar
    Join Date
    Apr 2001
    Posts
    357

    ?...

    ...how does it work then?
    There are 10 types of people in the world - those that understand binary, and those that don't.

  3. #3

    Thread Starter
    Lively Member moonguy's Avatar
    Join Date
    Apr 2001
    Location
    pune(india)
    Posts
    67

    sorry

    Sorry for low documentation sense.
    here is how u do it:u create an object of the Randgen class after setting a reference to the Randset.exe in ur prj.then call its fn
    getall(lim as int) which returns the random set.

    & here is how it works(this is only the code for the fn) :-

    public function getall(lim as integer) as integer()
    Dim arr(lim) As Integer
    Dim i As Integer
    Dim j As Integer
    Dim num As Integer
    Randomize
    arr(i) = Rnd * 10 \ 1
    i = i + 1
    Do While i <= lim
    seed: num = Rnd * 10 \ 1
    For j = 0 To i - 1
    If num = arr(i) Then GoTo seed
    Next
    arr(i) = num
    If i = lim Then Exit Do else i=i+1
    Loop
    getall=arr()
    End Sub
    Last edited by moonguy; May 25th, 2001 at 07:08 AM.
    Vishal Mungi
    [email protected]
    www.geocities.com/vishalmungi

    VB,ASP,C++,Java,Oracle,MAX,photoshop,XML..,


    ~~~~
    \ - - /

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