viewing paste random number (non-repeat) | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
prontera,155,171,5      script  Sample  757,{
// range of random numbers
setarray .@range,0,9;
// generate how many numbers
set .@count,10;
 
set .@compare$,"|";
while( .@size < .@count ){
        do{
                set .@random,rand( .@range[0],.@range[1] );
        }while( compare( .@compare$,"|"+.@random+"|" ) );
        set .@compare$,.@compare$ + .@random + "|";
        set .@array[.@size],.@random;
        dispbottom ".@array["+.@size+"] = "+.@random;
        set .@size,.@size + 1;
}
 
}
Viewed 604 times, submitted by Emistry.