home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 76
/
076.d81
/
forum
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
307b
|
11 lines
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