home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
BBSING
/
BBS
/
DBBS50.LBR
/
ADD-MSG.CZD
/
ADD-MSG.CMD
Wrap
OS/2 REXX Batch file
|
2000-06-30
|
1KB
|
56 lines
? "Begin entering message. Use '/EX' to exit (without the quotes)."
?
STORE ' |----------------64 characters per line------------------------|';
TO SHOW
* LENGTH is maximum number of characters per line
STORE 64 TO LENGTH
* MAX is maximum number of lines per message
?
? SHOW
* Print the old text
IF CHANGE
? ' :'+TEXT
ENDIF
STORE T TO NOT:DONE
* Loop while still entering msg and while we still have room
DO WHILE NOT:DONE .AND. NUM<MAX
RELE LINE
ACCEPT ' ' TO LINE
* Check to see if line is too long
IF LEN(LINE)>LENGTH
? CHR(7)+'Too long -- more than 64 characters!'
? $((LINE),1,64)
? $((LINE),65,64)
STORE $((LINE),1,64) TO LINE
ENDIF
* Check to see if through entering message (?)
IF !(LINE)='/EX'
RELE LINE
STORE NUM-1 TO NUM
STORE F TO NOT:DONE
LOOP
ENDIF
IF CHANGE
STORE F TO NOT:DONE
ELSE
STORE NUM+1 TO NUM
ENDIF
IF .NOT. CHANGE
APPEND BLANK
REPLACE NO WITH MSG:NMBR,TEXT WITH LINE
ELSE
REPLACE TEXT WITH LINE
ENDIF
ENDDO while not:done .and. num<max
RELE LENGTH,SHOW,DNUM,CNUM