Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Scriptol/While Let

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

While Let Common syntax 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 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; }