I agree; because labels can be used as a debugging aid as well as targets of branches, it would make sense to allow labels anywhere, but prohibit branching to them where such actions are not appropriate.
Lelsie On 2026-05-24 07:21:23 Rony G. Flatscher wrote: > Maybe a question directed at Rick and Erich: would there be any downsides > to allowing labels in DO/IF/SELECT blocks, and if so, which ones would be > imaginable? It seems that allowing labels in all those places would allow > doing a trace label to see which blocks get executed. > > ---rony > > On 23.05.2026 21:46, Josep Maria Blasco wrote: > > Hi all, > > > > I would like to reopen the discussion about labels inside block > > instructions. Currently, labels are not allowed inside IF, DO, LOOP and > > SELECT. > > > > The ANSI standard defines error 47, "Unexpected label", with a single > > subcode, 47.1: 'INTERPRET data must not contain labels; found "<name>"'. > > > > Rexx/VM for VM/ESA Version 2 Release 4.0 defines "DMSREX219E Error 47 > > Unexpected label". > > > > ooRexx 5.2.0 also defines 47.1, and, additionally, it defines: > > > > * 47.2: Labels are not allowed within a DO/LOOP block; found "label". > > * 47.3: Labels are not allowed within an IF block; found "label". > > * 47.4: Labels are not allowed within a SELECT block; found "label" > > > > Consistently, when a label appears inside a block instruction, it is > > flagged at parse time and the program doesn't run. > > > > Compare this to the behaviour of Rexx/VM (CMS Level 15, Service level > > 903, REXX370 4.02 01 Dec 1998). > > > > Program: > > > > /* REXX */ > > TRACE L > > A: IF 1;B: THEN C: DO; D: SAY HELLO; E: END > > > > Output: > > > > Ready; T=0.02/0.04 20:42:01 > > test > > 3 *-* A: > > *-* B: > > *-* C: > > *-* D: > > HELLO > > *-* E: > > Ready; T=0.01/0.01 20:42:05 > > > > We simply *cannot* have "Home of the Open Object Rexx Project. ooRexx is > > the open source version of IBM's Object REXX Interpreter. _*It is > > upwardly compatible with classic REXX and will execute classic REXX > > programs unchanged*_. The project is managed by the Rexx Language > > Association" written at the start of SourceForge homepage and allow this > > behaviour in the ooRexx interpreter. > > > > Josep Maria _______________________________________________ Oorexx-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/oorexx-devel
