jsseng / arduino_robot

1 stars 2 forks source link

loop runs 1 time #73

Closed jsseng closed 9 years ago

jsseng commented 9 years ago

I'm not sure if this issue is related to the other loop issue, but here is the code I used:

var x = 1
repeat x < 10 times {
    clear 
    display x
    sleep 1000
    x = x + 1
}

This generates the following C which runs once:

{
int rptCnt;
for (rptCnt = 0; rptCnt < (x < 10); rptCnt++)
{
clear_screen();
sprintf(_printBuffer, "%d",x);
print_string(_printBuffer);
_delay_ms(1000);
x = (x + 1);
}
}