home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1985 March
/
1985-03.d64
/
avail
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
53 lines
1 sys65517:ifpeek(781)=40thena=40:poke53281,1:goto5
2 a=22
5 print"[147]"tab((a-8)/2)"[144]avail":fori=1to2000:next
10 dimw$(20),x$(20),in$(20):print"[147]"
20 print:print"?:";:gosub30:in$=b$:b$="":goto60:rem main program starts @ 20
30 getc$:printc$;:ifc$=chr$(13)thenreturn
40 ifc$=chr$(20)thenb$=left$(b$,len(b$)-1):goto30
50 b$=b$+c$:goto30
60 l=len(in$):p=1:w=1
70 fori=1tol:ifmid$(in$,i,1)=" "thengosub200
80 next
90 w$(w)=mid$(in$,p)
100 e$=right$(w$(w),1):ife$="."ore$="?"ore$="!"then120
110 goto130
120 w$(w)=left$(w$(w),len(w$(w))-1)
130 forj=1tow:x$(j)=w$(j):next
140 gosub210
150 print" ok?";
160 getok$:ifok$=""then160
170 ifok$="n"thengosub410
180 j=w:in$(c)=in$:c=c+1:ifc>19thenc=0
190 in$="":goto20
200 w$(w)=mid$(in$,p,i-p):p=i:w=w+1:return
210 print:print:fori=1tow
220 ifx$(i)="was"orx$(i)=" was"thenw$(i)=" were"
230 ifx$(i)="i"orx$(i)=" i"orx$(i)=" me"orleft$(x$(i),2)="i'"thenw$(i)=" you"
240 ifx$(i)=" were"thenw$(i)=" was"
250 ifx$(i)=" my"thenw$(i)=" your"
260 ifx$(i)=" am"thenw$(i)=" are"
270 ifx$(i)="you"orx$(i)=" you"thenw$(i)=" i"
280 ifx$(i)="you're"orx$(i)=" you're"thenw$(i)=" i'm"
290 ifx$(i)="your"orx$(i)=" your"thenw$(i)=" my"
300 ifright$(x$(i),2)="'s"thenw$(i)=left$(x$(i),len(x$(i))-2)+" is"
310 ifright$(x$(i),3)="i'm"thenw$(i)=left$(x$(i),len(x$(i))-3)+"you are"
320 ifx$(i+1)=" are"andx$(i)+x$(i+1)="you are"thenw$(i+1)="'m"
330 ifright$(x$(i),3)="'ve"thenw$(i)=left$(x$(i),len(x$(i))-3)+" have"
340 ifright$(x$(i),2)="'d"thenw$(i)=left$(x$(i),len(x$(i))-2)+" would"
350 ifright$(x$(i),4)=" the"thenw$(i)=left$(x$(i),len(x$(i))-4):rem delete"the"
360 ifright$(x$(i),3)=" an"thenw$(i)="":rem delete"an"
370 ifright$(x$(i),2)=" a"thenw$(i)=x$(i+1)
380 next
390 fori=1toj+1:printw$(i);:next
400 return
410 x=int(7*rnd(0))+1:print" no? ";
420 onxgoto430,440,450,460,470,480,490
430 print"what'd you expect me to say? ";in$(x):return
440 print"in what way? ";:return
450 print"i don't understand ";:return
460 print"really? ";:return
470 print:return
480 print"why? ";:return
490 print:return