home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
451-475
/
apd472
/
word_wrap_demo.amos
/
word_wrap_demo.amosSourceCode
Wrap
AMOS Source Code
|
1993-03-13
|
615b
|
22 lines
'Screen Open 0,640,200,16,Hires
Flash Off : Curs Off
A$=A$+"The Frogfish is found to be so diverse in it's appearance that trying to "
A$=A$+"distinguish between different species is quite complicated."
WRAP[A$,39]
Procedure WRAP[A$,SW]
Rem A$ containts the string and SW is the number of characters including 0
Repeat
WORD$=""
Repeat
Inc P1
L$=Mid$(A$,P1,1)
WORD$=WORD$+L$
Until L$=" "
If Left$(WORD$,1)=" " and X Curs=(0) Then WORD$=Right$(WORD$,Len(WORD$)-1)
If X Curs+Len(WORD$)>SW Then Print
Print WORD$;
Until P1=Len(A$)
End Proc