Difference between revisions of "Do while/fr"
< Do while
Jump to navigation
Jump to search
Samia Bechir (talk | contribs) (New page: {{Multi-lang}} {{#vardefine:p_loop_desc|Executes once, then executes '''condition'''. }}{{#vardefine:p_condition_desc|If condition executes true, it then loops back and executes '''loop'''...) |
m (Cosmetical) |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Multi-lang}} | {{Multi-lang}} | ||
{{#vardefine: | {{#vardefine:p_boucle_desc|S'exécute une fois, puis vérifie '''condition'''. | ||
}}{{#vardefine:p_condition_desc| | }}{{#vardefine:p_condition_desc|Si la condition vérifiée est vraie, revient en arrière et effectue '''boucle''' à nouveau. | ||
}}{{LSL_Conditional | }}{{LSL_Conditional/fr | ||
|statement=do while | |statement=do while | ||
|statement_header | |statement_header | ||
|statement_desc= | |statement_desc=Chacune de ces instructions peut être vide. Une boucle do... while est légèrement plus rapide et utilise moins de mémoire qu'une boucle while or for. | ||
|statement_title=do {{LSL Param| | |statement_title= do {{LSL Param|boucle}} while ({{LSL Param|condition}}); | ||
|p1_name= | |p1_name=boucle | ||
|p2_name=condition | |p2_name=condition | ||
|constants | |constants | ||
|spec | |spec | ||
|caveats | |caveats | ||
|examples=<pre>// | |examples=<pre>// Compte de 1 à 5 | ||
default | default | ||
{ | { | ||
Line 20: | Line 20: | ||
do | do | ||
llSay(0, (string) (++olf)); | llSay(0, (string) (++olf)); | ||
while(olf<5); | while (olf < 5); | ||
} | } | ||
}</pre> | }</pre> | ||
<pre>// | <pre>// Compte de 0 à 4 | ||
default | default | ||
{ | { | ||
Line 30: | Line 30: | ||
integer olf; | integer olf; | ||
do | do | ||
llSay(0, (string)olf); | llSay(0, (string) olf); | ||
while((++olf)<5); | while ((++olf) < 5); | ||
} | } | ||
}</pre> | }</pre> | ||
Line 43: | Line 43: | ||
|mode | |mode | ||
|deprecated | |deprecated | ||
|cat1=Conditional | |cat1=Conditional/fr | ||
|cat2 | |cat2 | ||
|cat3 | |cat3 | ||
|cat4 | |cat4 | ||
}} | }} |
Latest revision as of 02:40, 24 December 2007
LSL Portail Francophone | LSL Portail Anglophone | Fonctions | Évènements | Types | Operateurs | Constantes | Contrôle d'exécution | Bibliothèque | Tutoriels |
do boucle while (condition);
| ||||||||||||||||
Spécification
| ||||||||||||||||
Exemples// Compte de 1 à 5 default { state_entry() { integer olf; do llSay(0, (string) (++olf)); while (olf < 5); } } // Compte de 0 à 4 default { state_entry() { integer olf; do llSay(0, (string) olf); while ((++olf) < 5); } } |
Do while