|
-
May 24th, 2001, 10:12 AM
#1
Thread Starter
Lively Member
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
|
|
-
May 24th, 2001, 01:41 PM
#2
Hyperactive Member
?...
...how does it work then?
There are 10 types of people in the world - those that understand binary, and those that don't.
-
May 25th, 2001, 06:53 AM
#3
Thread Starter
Lively Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|