[Toc][Index]

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)   

Created using Inf-PHP v.2 (c) 2003 Yuri Prokushev
Created using Inf-HTML v.0.9b (c) 1995 Peter Childs