Colobot Wiki
Advertisement

Syntax :

while ( condition )
{
	continue;
}

With this instruction, you can jump over the rest of instructions in the block of a while or for loop: The execution will resume at the beginning of the block, the next time the loop is repeated.

Here is an example:

int i = 0;
while ( i < 5 )
{
	i = i+1;
	if ( i == 3 )
	{
		continue;
	}
	Instructions ...
}

The instructions will only be executed for the values of i 1, 2, 4 and 5.

Advertisement