home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
database
/
dbadv.zip
/
WRAP.PRG
< prev
Wrap
Text File
|
1986-02-25
|
640b
|
30 lines
*start a new print line
?
*
*set the printing pointer to the beginning of the line
STORE 0 TO printed
*
* process the entire string
&firstchar
do while .NOT. &ENDSTRING
*
* get the next word
DO word
*
*if the word won 't fit on the same line
*start a new line
IF len(newstring) + printed > MARGIN
?
STORE 0 TO printed
ENDIF len(newstring) + printed > MARGIN
*
*print the word without a carriage return
?? newstring
*
*increase the printing pointer
STORE len(newstring) + printed + 1 TO printed
ENDDO WHILE .not. &endstring
*
*clean up
RELEASE printed,newstring