Skip to main content

Questions tagged [while-loop]

Use for questions about a segment of code that repeatedly, at the start of each loop, checks some condition and exits if it is false.

14 votes
1 answer
3k views

So, WebAssembly has two types of blocks of code, block and loop. When you break with br or <...
FlatAssembler's user avatar
18 votes
7 answers
5k views

I'm trying to teach a friend to code in Python. I've noticed that whenever they write a while loop with an integer increment, such as the one shown below: ...
Redz's user avatar
  • 1,096
10 votes
1 answer
720 views

Consider the Lua programming language, which has the following constructs involving the keywords do and end: ...
Luatic's user avatar
  • 390
3 votes
5 answers
338 views

An until loop construct until (x) can almost always be achieved with a while loop while (!x). What's a possible reasoning behind ...
Nimesh Neema's user avatar
22 votes
7 answers
2k views

One somewhat rarely used, but still occasionally handy, feature of many programming languages is do ... while loops: ...
rydwolf's user avatar
  • 4,870