poring_w01,100,100,5 script test_mail 1_F_MARIA,{
setarray .@a$, "0","1","2","3";
setarray .@resultset$,
"0,1,2,3","0,1,3,2","0,2,1,3","0,2,3,1","0,3,1,2","0,3,2,1",
"1,0,2,3","1,0,3,2","1,2,0,3","1,2,3,0","1,3,0,2","1,3,2,0",
"2,0,1,3","2,0,3,1","2,1,0,3","2,1,3,0","2,3,1,0","2,3,0,1",
"3,0,1,2","3,0,2,1","3,1,0,2","3,1,2,0","3,2,0,1","3,2,1,0";
.@loop = 2400;
for ( .@l = 0; .@l < .@loop; ++.@l ) {
copyarray .@b$, .@a$, 4;
array_shuffle(.@b$);
freeloop true;
for ( .@i = 0; .@i < 24; ++.@i ) {
.@print$ = implode( .@b$, "," );
if ( .@print$ == .@resultset$[.@i] ) {
++.@resultset[.@i];
break;
}
}
}
for ( .@i = 0; .@i < 24; ++.@i ) {
dispbottom "result set "+( .@i +1 )+" '"+ .@resultset$[.@i] +"' has "+ .@resultset[.@i] +" times.";
.@total += .@resultset[.@i];
}
dispbottom "total = "+ .@total;
end;
}