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

26 lines
494 B
Plaintext

\b;Instrukcja \c;break\n;
Składnia:
\s;\c;while ( warunek )
\s;{
\s; break;
\s;}
\n;
Instrukcja break kończy wykonywanie pętli \c;\l;while\u cbot\while;\n; lub \c;\l;for\u cbot\for;\n;.
Oto przykład:
\s;\c;int i = 0;
\s;while ( true )
\s;{
\s; \n;Instrukcje ...\c;
\s; i = i+1;
\s; if ( i >= 10 )
\s; {
\s; break;
\s; }
\s; \n;więcej instrukcji ...\c;
\s;}
\n;
\t;Zobacz również
\l;Programowanie\u cbot;, \l;typy\u cbot\type; i \l;kategorie\u cbot\category;.