REXX Tips & Tricks, Version 2.80


Inf-HTML [About][Toc][Index] 0.9b (c) 1995 Peter Childs


DO loops


To make nested DO loops more readable you should add the name of the 
repetitor after the END statement. 
Example: 

 
  do i = 1 to 4
    do j = 1 to 5
      do k = 1 to 3
        say i j k
      end k
    end j
  end i

  
Note:  As a side effect of this technique the REXX Interpreter can check 
       the nesting of the loops. 
 In OS/2 WARP 3 the REXX interpreter generates a TRAP D if there are two 
 END statements on the same line without the delimiter ';' between them. 
 This bug is fixed in the WARP 3 Fixpack (source: APAR PJ19346)   

Inf-HTML End Run - Successful