home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
epm603a.zip
/
EPMREX.ZIP
/
COMMENT.ERX
< prev
next >
Wrap
Text File
|
1992-08-28
|
768b
|
21 lines
/*
* Name COMMENT.ERX
*
* Author Ralph E. Yozzo
*
* Function An example EPM REXX macro.
* This macro adds a blank comment to the end of lines
* that are less than 50 characters in length.
*/
size=50 /* the maximum size of the line to modify */
parse arg args
'top'
'extract /last'
totallines=last.1 /* Save the total number of lines in file */
do i = 1 to totallines
'extract /getline/line'
/* change lines that are less than 50 characters */
if length(getline.1)<size then call etkreplacetext substr(getline.1,1,size)|| '/*'||substr('',1,30)||'*/',line.1
if line.1 < totallines then '+1' /* Move down one line if we are not at the bottom */
end