Syntax:
choice(TaskA,TaskB,PA0,Cond1,PA1,cond2,PA2,…,Condn,PAn)
where 0< PAi <1, iÎ[0,n], condi Îbool, condi are boolean variables
Meaning:
{ n= rand(1)
if (Cond1== TRUE)
if (n<= PA1) TaskA; else TaskB;
else if (Cond2= TRUE)
if (n<= PA2) TaskA; else TaskB;
…
else if (Condn== TRUE)
if (n<= PAn) TaskA; else TaskB;
else
if (n<= PA0) TaskA; else TaskB;
}
» Tin mới nhất:
» Các tin khác: