Beginer, how to do this?

x;y;a variables

if x do y until a.

Plese help, i dont know how to type this in the, correct way.

i tried

case 5:
Right(150, 150);
if(senRight){
break;
}
else{
Right(150, 150);
}
it didnt work ;(

if x do y until a.

Until a what?

Use this format:

while(a) {

if(x) {

//put your "do y" code here

}

}

The outline code in Reply #2 has no means to change the value of the variable a so the WHILE will never terminate.

@Hyper12347, it will be much easier (for you as well as us) to figure out a solution if you use meaningful names for your variables rather than single characters.

...R

Robin2:
The outline code in Reply #2 has no means to change the value of the variable a so the WHILE will never terminate.

Granted but since the question was so generic, I intended for 'a' to be a placeholder for some sort of conditional test. For example, 'a' might be (adc_reading > 200) or something like that. How the conditional test establishes a change in state is something to be handled elsewhere and again, that isn't clearly defined.

Gahhhrrrlic:
Granted but since the question was so generic, I intended for 'a' to be a placeholder for some sort of conditional test

I do understand. But unintentional infinite WHILE loops are a very common problem on the Forum so it is well to preempt the issue.

...R

Good point.