View script | License | Download documentation as: HTML or editable |
Download script | History | Other scripts by: crazyaxe |
30-Apr 16:37 UTC
[0.061] 10.314k
[0.061] 10.314k
Documentation for: superenalotto.rThe most important function in this program is "funz_estr", because this function extract 6 random number and sort them , and then verify they are all different. It could be very useful: funz_estr: func [] [ prova: [] until [ verifica: true prova: head prova clear prova loop 6 [ wait random 6 p1/data: p1/data + 0.08 show p1 insert prova random 90 ] sort prova forall prova [ if (index? prova) = 6 [break] if (( first prova ) = ( second prova)) [ verifica: false ] ] verifica ] prova: head prova return prova ] prova: [] is an empty array to fill with the correct extraction. The function loop the extraction untill are serie of all different numbers are extracted. Moreover it sort them. |