Difference between revisions of "While/fr"
< While
Jump to navigation
Jump to search
m (cosmetical) |
m (remise en forme de la parti code) |
||
(One intermediate revision by one other user not shown) | |||
Line 10: | Line 10: | ||
|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