--- parse.cmd 2001-10-04 11:35:28.000000000 -0400 +++ parse.rex 2010-08-07 07:16:29.779955000 -0400 @@ -1,3 +1,4 @@ +#!/usr/bin/rexx /* REXX */ /* @@ -36,17 +37,24 @@ columns. those of AWK, to allow easier learning and present an enviroment more consistent with other tools the user may have encountered. +*/ + +/* MDL / LDS modification on 20100807 to accomodate ooRexx + 4.0.1 always returning 0 for the Lines() BIF. Had to + rely on the 'signal no notready' event handler instead */ -TRACE 'OFF' ; +TRACE 'OFF' ; PARSE ARG templateRoutine ; /* SYNTAX seems to be the only trap needed to trigger 'Help'. */ SIGNAL ON SYNTAX NAME Help ; /* -- This must be set in the Main Routine to be effective in Main */ /* See Daney, 'Programming in REXX', p. 204 */ - - + +/* Workaround for ooRexx v4.0.1 */ +signal on notready + CALL StartUp ; @@ -198,17 +206,20 @@ RL = Length( DZ ) ; /* for manipulations */ ZD = Reverse( DZ ) ; /* reversed current record */ -somelines = 0 >< Lines( input ) ; +--somelines = 0 >< Lines( input ) ; /* -- Testing after the possible failure of the above LineIn(), For Regina. */ -IF \ somelines THEN /* Ran off the end of the input, need to reset */ - NR = NR - 1 ; /* line counter back to last line on the input */ +--IF \ somelines THEN /* Ran off the end of the input, need to reset */ +-- NR = NR - 1 ; /* line counter back to last line on the input */ -RETURN somelines ; /* BLines */ +--RETURN somelines ; /* BLines */ +return 1 +notready: +exit 0 Help: