Rev 5903 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3263 | bpr | 1 | :Fonctions aléatoires |
2 | :Fonction,Exemple,Signification |
||
3460 | bpr | 3 | :random( .. ) |
3263 | bpr | 4 | random(-5..5) |
5 | un nombre au hasard entre -5 et 5. |
||
6 | |||
3460 | bpr | 7 | :randint( .. ) |
3263 | bpr | 8 | randint(-5..5) |
8510 | bpr | 9 | un entier au hasard entre -5 et 5 (bornes comprises). |
3263 | bpr | 10 | |
3460 | bpr | 11 | :random( ) |
3263 | bpr | 12 | random(1,2,3,a,b,c) |
13 | un item au hasard parmi {1,2,3,a,b,c} |
||
14 | |||
3460 | bpr | 15 | :shuffle( ) |
3263 | bpr | 16 | shuffle(6) |
17 | une liste de 6 entiers 1,2,...,6, dans un ordre aléatoire. |
||
18 | |||
3460 | bpr | 19 | :shuffle( , ) |
3263 | bpr | 20 | shuffle(a,b,c,d,e) |
8510 | bpr | 21 | la liste des lettres {a,b,c,d,e}, dans un ordre aléatoire. <span class="wims_warning">$wims_name_warning</span>, si le premier mot est <span class="tt wims_code_words">even</span> ou <span class="tt wims_code_words">odd</span>, la permutation effectuée sera respectivement paire ou impaire (aussi, cela ne peut être le premier mot de la liste à permuter). |
3263 | bpr | 22 | |
3460 | bpr | 23 | :randomitem( ) |
3263 | bpr | 24 | randomitem(\list) |
8510 | bpr | 25 | un item au hasard de la liste \list (items séparés par des virgules). |
3263 | bpr | 26 | |
3460 | bpr | 27 | :randitem( ) |
28 | randitem(+,-) |
||
5903 | bpr | 29 | un signe aléatoire: + ou - ; <span class="tt wims_code_words">randitem(\list)</span> est un item au hasard de la liste <span class="tt wims_code_variable">\list</span> (items séparés par des virgules). |
3263 | bpr | 30 | |
3460 | bpr | 31 | :randomrow( ) |
3263 | bpr | 32 | randomrow(\mat) |
8510 | bpr | 33 | une ligne au hasard de la matrice \mat. |