Difference between revisions of "While/fr"
< While
Jump to navigation
Jump to search
Forest Klaar (talk | contribs) |
m (remise en forme de la parti code) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Multi-lang}} | {{Multi-lang}} | ||
{{LSL_Conditional | {{LSL_Conditional/fr | ||
|statement=while | |statement=while | ||
|statement_header | |statement_header | ||
|statement_desc= | |statement_desc=Chaque instruction peut être l'instruction vide. | ||
|statement_end= | |statement_end=boucle | ||
|statement_end_desc=Peut être une instruction simple, un bloc d'instructions, ou un bloc vide. | |statement_end_desc=Peut être une instruction simple, un bloc d'instructions, ou un bloc vide. | ||
|p1_name=condition|p1_desc=Si la condition est évaluée à true, alors ''' | |p1_name=condition|p1_desc=Si la condition est évaluée à true, alors '''boucle''' est exécutée | ||
|constants | |constants | ||
|spec | |spec | ||
|caveats | |caveats | ||
|examples=< | |examples=<source lang="lsl2"> | ||
//single statement | |||
integer a = 0; | integer a = 0; | ||
integer b = 10; | integer b = 10; | ||
while(a < b) | while(a < b) | ||
llOwnerSay((string)(a++)); | llOwnerSay((string)(a++)); | ||
</ | </source> | ||
< | <source lang="lsl2"> | ||
//block statement | |||
integer a = 0; | integer a = 0; | ||
integer b = 10; | integer b = 10; | ||
Line 24: | Line 26: | ||
++a; | ++a; | ||
} | } | ||
</ | </source> | ||
< | <source lang="lsl2"> | ||
//null statement | |||
integer a = 0; | integer a = 0; | ||
integer b = 10; | integer b = 10; | ||
while(a++ < b); | while(a++ < b); | ||
</ | </source> | ||
|helpers | |helpers | ||
|also_header | |also_header | ||
Line 36: | Line 39: | ||
|also_articles | |also_articles | ||
|also_footer | |also_footer | ||
|notes=Une boucle {{LSLG|do-while}} est plus rapide qu'une boucle while ou {{LSLG|for}}. | |notes=Une boucle {{LSLG|do-while/fr|do-while}} est plus rapide qu'une boucle while ou {{LSLG|for/fr|for}}. | ||
|mode | |mode | ||
|deprecated | |deprecated | ||
|cat1=Conditional | |cat1=Conditional/fr | ||
|cat2 | |cat2 | ||
|cat3 | |cat3 | ||
|cat4 | |cat4 | ||
}} | }} |
Latest revision as of 22:56, 25 July 2015
LSL Portail Francophone | LSL Portail Anglophone | Fonctions | Évènements | Types | Operateurs | Constantes | Contrôle d'exécution | Bibliothèque | Tutoriels |
while( condition ) boucle
| ||||||||||||||||
Spécification
| ||||||||||||||||
Exemples//single statement
integer a = 0;
integer b = 10;
while(a < b)
llOwnerSay((string)(a++));
//block statement
integer a = 0;
integer b = 10;
while(a < b)
{
llOwnerSay((string)a);
++a;
}
//null statement
integer a = 0;
integer b = 10;
while(a++ < b);
| ||||||||||||||||
While