[fpc-devel]Some pascal enhancement

Michael Van Canneyt michael.vancanneyt at wisa.be
Tue Oct 16 14:55:34 CEST 2001


On Tue, 16 Oct 2001, Peter Vreman wrote:

> > Aleksey V. Vaneev wrote:
> > >  to break; and continue; instructions. Like break (2); or continue
> > >  (3);
> > What is the mean, using goto and labels solves this problem. Labels in pascal is a bad
> style, but who can say that these
> > "many-storied" breaks would be better? IMHO, "pretty programming style" should not be an
> end in itself: effectivity of
> > solution of concrete problem is more important.
>
> I agree here that using goto and a label is much nicer and creates less errors. Because
> adding an extra loop would require you to adjust all the continue(2) to continue(3), and
> forgetting one is easily done as it doesn't trigger a compiler error/warning

Not to mention that Break/Continue are ugly constructs, which can be easily removed by
making your 'for' a 'while' or 'repeat', and adapting the while/repeat condition.

Michael.





More information about the fpc-devel mailing list