Search tutorials
The Variable "x" is used to check the content of Variable "Temp" which will hold the final result.
Set Variable: "x" = 1And now for the tougher bit:
Loop While (x <> (Length(Temp)+1)) If ((Substring (Temp, x, 1)) eq rnd) Set Variable: "rnd" = "" End If Set Variable: "x" = x+1 End LoopThis checks whether a generated random number, held in Variable "rnd", already exists in the "Temp" variable. This is done by looping through every digit in "Temp". The number of loops is determined by the Length function. If the number does exist the variable "rnd" is cleared. If the generated number is not present in "Temp" it is added to it.
If (rnd ne "") Set Variable: "Temp" = Temp & rnd Set Variable: "i" = i + 1 End IfWe continue the Loop by increasing "i".
» Level Advanced |
Added: 2000-03-07 Rating: 6.85 Votes: 304 |
» Author |
No Information Given |
» Download |
Download the files used in this tutorial. |
Download (11 kb) |
» Forums |
More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.
Comments
There are no comments yet. Be the first to comment!