home *** CD-ROM | disk | FTP | other *** search
- 10 dima$(40):input"enter a string";a$:gosub1000
- 20 w$="":input "which word (_ for another string)";w$:w=val(w$)
- 25 ifw$="_"thenrun
- 30 printa$(w):goto20
- 1000 s$=chr$(0):fori=1tolen(a$)
- 1010 ifmid$(a$,i,1)=" "ormid$(a$,i,1)="[160]"thens$=s$+chr$(i)
- 1020 next:s$=s$+chr$(len(a$)+1)
- 1025 forw=1tolen(s$)-1
- 1030 a$(w)=mid$(a$,asc(mid$(s$,w,1))+1,asc(mid$(s$,w+1,1))-asc(mid$(s$,w,1))-1)
- 1040 next:return
-