home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Transactor
/
Transactor_11_1986_Transactor_Publishing.d64
/
word-wrap
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
248b
|
12 lines
100 rem* recursive word-wrap routine *
110 rem* put string in w$,
120 rem* line width in w
130 :
140 if len(w$)>w then 160
150 print w$: return
160 p=0: for i=w to 1 step-1
170 if p=0 and mid$(w$,i,1)=" "then p=i
180 next: h$=right$(w$,len(w$)-p)
190 w$=left$(w$,p): gosub150
200 w$=h$: goto 140