colobot-data/help/F/cbot/break.txt

27 lines
530 B
Plaintext

\b;Instruction \c;break\n;
Syntaxe:
\s;\c;while ( condition )
\s;{
\s; break;
\s;}
\n;
Cette instruction permet de sortir immédiatement d'une structure \c;\l;while\u cbot\while;\n; ou \c;\l;for\u cbot\for;\n;.
Voici un exemple d'utilisation:
\s;\c;int i = 0;
\s;while ( true )
\s;{
\s; \n;Instructions ...\c;
\s; i = i+1;
\s; if ( i >= 10 )
\s; {
\s; break;
\s; }
\s;}
\n;
\t;Dictionnaire anglais-français
\c;break\n; = rompre
\t;Voir aussi
\l;Programmation\u cbot;, \l;types\u cbot\type; et \l;catégories\u cbot\category;.