Block Closure
David Collier-Brown
daveb at geac.UUCP
Sun Apr 24 02:45:29 AEST 1988
In article <757 at l.cc.purdue.edu> cik at l.cc.purdue.edu (Herman Rubin) writes:
>I find both of these methods at times easy to follow, and at times hard to
>follow. There is also the problem of a multiple break.
>[...]
> break LABEL
> endall LABEL
Well, both have been tried, with mixed results. One could label
begin-end blocks in PL/1, and add either the block label of the name
of the control structure between the "end" and its ";". At least
two compilers used this to double-check block nesting and produce
warning messages.
Similarly, some PL/1 variants (and my memory is fuzzy here...)
allowed a leave <label> statement which exited a named block. This
may have been part of the ANSI standard, but that was too long ago.
Labelled blocks and "endall" existed in BCPL, but were very
little-used. It was not obvious whether it was because it was
non-traditional or buggy, but is usually remembered in terms of the
claim that it lead to making block-balancing errors.
--
David Collier-Brown. {mnetor yunexus utgpu}!geac!daveb
Geac Computers International Inc., | Computer Science loses its
350 Steelcase Road,Markham, Ontario, | memory (if not its mind)
CANADA, L3R 1B3 (416) 475-0525 x3279 | every 6 months.
More information about the Comp.lang.c
mailing list