Colobot Wiki
Advertisement

Syntax :

while ( condition )
{
	break;
}

With this instruction, you can get out immediately of a while or for loop.

Here is an example:

int i = 0;
while ( true )
{
	Instructions ...
	i = i+1;
	if ( i >= 10 )
	{
		break;
	}
	more instructions ...
}
Advertisement