[Gambas-user] Array Shuffle method.
Gianluigi
bagonergi at gmail.com
Thu Mar 21 13:22:51 CET 2019
Hi,
can this be a correct use of the array Shuffle method?
[code]
Public Sub Main()
Dim aBingo As New Byte[]
Dim iPull As Byte
For i As Byte = 0 To 89
aBingo.Push(i + 1)
Next
aBingo.Shuffle()
iPull = aBingo[aBingo.Max]
Print "Extract "; iPull; "\n"
aBingo.Resize(aBingo.Max - 1)
'-------------------------------
Print "Checking:"
aBingo.Sort()
For Each i In aBingo
Print i
Next
End
[/code]
Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20190321/65006e44/attachment.html>
More information about the User
mailing list