do...while vs. repeat...until (was: Errors aren't that simple)

Esmond Pitt ejp at bohra.cpg.oz
Mon Mar 19 18:05:07 AEST 1990


In article <OVB2S3Bxds13 at ficc.uu.net> peter at ficc.uu.net (Peter da Silva) writes:
>The only sense in which repeat...until is more natural than do...while is

etc etc.

There is a further significant difference between the Pascal
repeat..until and the 'C' do..while. In Pascal, 'repeat..until'
delimits a statement-list, not a single statement as in 'C'.

Otherwise you would have to begin a multi-statement 'repeat..until'
with 'repeat begin', and end it with 'end until'. There is no formal
need for such redundancy.


-- 
Esmond Pitt, Computer Power Group
ejp at bohra.cpg.oz



More information about the Comp.lang.c mailing list