home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1985 March / 1985-03.d64 / avail (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  2KB  |  53 lines

  1. 1 sys65517:ifpeek(781)=40thena=40:poke53281,1:goto5
  2. 2 a=22
  3. 5 print"[147]"tab((a-8)/2)"[144]avail":fori=1to2000:next
  4. 10 dimw$(20),x$(20),in$(20):print"[147]"
  5. 20 print:print"?:";:gosub30:in$=b$:b$="":goto60:rem main program starts @ 20
  6. 30 getc$:printc$;:ifc$=chr$(13)thenreturn
  7. 40 ifc$=chr$(20)thenb$=left$(b$,len(b$)-1):goto30
  8. 50 b$=b$+c$:goto30
  9. 60 l=len(in$):p=1:w=1
  10. 70 fori=1tol:ifmid$(in$,i,1)=" "thengosub200
  11. 80 next
  12. 90 w$(w)=mid$(in$,p)
  13. 100 e$=right$(w$(w),1):ife$="."ore$="?"ore$="!"then120
  14. 110 goto130
  15. 120 w$(w)=left$(w$(w),len(w$(w))-1)
  16. 130 forj=1tow:x$(j)=w$(j):next
  17. 140 gosub210
  18. 150 print" ok?";
  19. 160 getok$:ifok$=""then160
  20. 170 ifok$="n"thengosub410
  21. 180 j=w:in$(c)=in$:c=c+1:ifc>19thenc=0
  22. 190 in$="":goto20
  23. 200 w$(w)=mid$(in$,p,i-p):p=i:w=w+1:return
  24. 210 print:print:fori=1tow
  25. 220 ifx$(i)="was"orx$(i)=" was"thenw$(i)=" were"
  26. 230 ifx$(i)="i"orx$(i)=" i"orx$(i)=" me"orleft$(x$(i),2)="i'"thenw$(i)=" you"
  27. 240 ifx$(i)=" were"thenw$(i)=" was"
  28. 250 ifx$(i)=" my"thenw$(i)=" your"
  29. 260 ifx$(i)=" am"thenw$(i)=" are"
  30. 270 ifx$(i)="you"orx$(i)=" you"thenw$(i)=" i"
  31. 280 ifx$(i)="you're"orx$(i)=" you're"thenw$(i)=" i'm"
  32. 290 ifx$(i)="your"orx$(i)=" your"thenw$(i)=" my"
  33. 300 ifright$(x$(i),2)="'s"thenw$(i)=left$(x$(i),len(x$(i))-2)+" is"
  34. 310 ifright$(x$(i),3)="i'm"thenw$(i)=left$(x$(i),len(x$(i))-3)+"you are"
  35. 320 ifx$(i+1)=" are"andx$(i)+x$(i+1)="you are"thenw$(i+1)="'m"
  36. 330 ifright$(x$(i),3)="'ve"thenw$(i)=left$(x$(i),len(x$(i))-3)+" have"
  37. 340 ifright$(x$(i),2)="'d"thenw$(i)=left$(x$(i),len(x$(i))-2)+" would"
  38. 350 ifright$(x$(i),4)=" the"thenw$(i)=left$(x$(i),len(x$(i))-4):rem delete"the"
  39. 360 ifright$(x$(i),3)=" an"thenw$(i)="":rem delete"an"
  40. 370 ifright$(x$(i),2)=" a"thenw$(i)=x$(i+1)
  41. 380 next
  42. 390 fori=1toj+1:printw$(i);:next
  43. 400 return
  44. 410 x=int(7*rnd(0))+1:print" no? ";
  45. 420 onxgoto430,440,450,460,470,480,490
  46. 430 print"what'd you expect me to say?  ";in$(x):return
  47. 440 print"in what way? ";:return
  48. 450 print"i don't understand ";:return
  49. 460 print"really? ";:return
  50. 470 print:return
  51. 480 print"why? ";:return
  52. 490 print:return
  53.