Difference between revisions of "While/fr"
< While
Jump to navigation
Jump to search
m (Fixing links) |
m (remise en forme de la parti code) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
|statement_end=boucle | |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 '''boucle''' est | |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; | ||
while (a < b) | while(a < b) | ||
{ | { | ||
llOwnerSay((string) a); | llOwnerSay((string)a); | ||
++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 |
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