SelectFrom Parameters

Top  Previous  Next

A Selectfrom parameter selects n values from an existing parameter.

 

$s=selectfrom($d,5)

 

$s will contain 5 values randomly selected from $d

 

Some examples

 

$d=range(1,20)

$s=selectfrom($d,3)

 

$s might contain 4,7,18

 

$d=deck()

$s=selectfrom($d,5)

 

$s might contain

 

6♠ 5♥ J♥  6♣  10♦

 

$d=list("Aaron","Barry","Cyril","Douglas","Egbert","Francis","Gerald","Hector","Ignatius","Jasper")

$s=selectfrom($d,2)

 

$s might contain "Cyril","Ignatius"