While Let edit

Common syntax edit

while x < 5
 print x
 x + 1
/while 


To increment a variable, Scriptol uses x + 1. This could not work in C and other languages.


Infinite loop in C edit

The C and C-like languages (C++, Java, C#) leads easily into infinite loop. Here hare two simple examples.

while(x < 5);
{
  printf("%d\n", x);
  x += 1:
}

Perhaps you have instantaneously noticed it (and perhaps no), but the construct is bad, due to the semi-colon after the condition!

Another example without the misplaced semi-colon:

while(x < 10)
{
  printf("%d\n", x);
  if(x = 5) continue;
  ... some statements ...
  x += 1;
}