<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Jordi Guillaumes i Pons<br class=""><a href="mailto:jg@jordi.guillaumes.name" class="">jg@jordi.guillaumes.name</a><br class="">HECnet: BITXOW::JGUILLAUMES<br class=""><br class=""><br class=""></div></div>

</div>
<div><blockquote type="cite" class=""><div class=""><div class=""><br class="">I was also going to point out that neither {} nor [] exist in (System/360 era)<br class="">EBCDIC, so could not have been used in PL/1.<br class=""><br class="">PL/1 (or PL/I, to use the later naming convention) has both BEGIN/END and<br class="">DO/END, with different effects.  I got a long lecture from an office mate once<br class="">about a program which was using BEGIN/END where DO/END was preferable, because<br class="">BEGIN blocks actually create a new context, with internal/external scope<br class="">details, while DO blocks do not create a new context.<br class=""></div></div></blockquote></div><br class=""><div class="">There are no curly braces on any PL/I version that I’m aware of. </div><div class=""><br class=""></div><div class="">The “normal” way to build statement blocks is DO/END, with are just combined statements (so can be used in IF…ELSE… or WHILE blocks; PL/I has no ‘END IF nor ‘END WHILE’ statements). BEGIN/END create a semantic context where you can define local variables or, more usefully, establish local condition handlers.</div><div class=""><br class=""></div><div class="">A way to do a controlled check for overflow is, for instance</div><div class=""><br class=""></div><div class="">…</div><div class="">BEGIN;</div><div class="">    DECLARE IS_OVERFLOW BIT(1) INIT(‘0’B);</div><div class="">    ON OVERFLOW IS_OVERFLOW = ‘1’B;</div><div class="">    NUMBER = BIGNUMBER1 + BIGNUMBER2;</div><div class="">    IF IS_OVERFLOW THEN CALL HANDLE_OVERFLOW();</div><div class="">END;</div><div class="">…</div><div class=""><br class=""></div><div class="">That “ON” condition is only valid inside the BEGIN/END block, so if an OFL condition occurs elsewhere (and you have used the correct compiler options) the program will crash (“ABEND”, in IBM idiom). That is actually what you really WANT to happen (better to get a call at 3am than to have to correct a corrupt file).</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Jordi Guillaumes i Pons<br class=""><a href="mailto:jg@jordi.guillaumes.name" class="">jg@jordi.guillaumes.name</a><br class="">HECnet: BITXOW::JGUILLAUMES<br class=""></div></body></html>