Logo

Programming-Idioms

History of Idiom 78 > diff from v46 to v47

Edit summary for version 47 by Bart:
New Pascal implementation by user [Bart]

Version 46

2016-07-08, 16:42:54

Version 47

2016-07-08, 16:46:05

Idiom #78 "do while" loop

Execute a block once, then execute it again as long as boolean condition c is true.

Idiom #78 "do while" loop

Execute a block once, then execute it again as long as boolean condition c is true.

Code
repeat
  Something;
  SomethingElse;
until not c;
Comments bubble
This is the correct implementation, it repeats the block until condition c is not true