home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1989 November / 1989-11.d64 / inputdemo1 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  546b  |  16 lines

  1. 5 rem copyright 1989 compute! publications, inc. - all rights reserved
  2. 10 ifpeek(49152)<>32 then load"input.ml",8,1
  3. 20 poke53280,0:poke53281,0:print"[147]hello!"
  4. 30 print"what is your name ? [192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  5. 40 sys49152,2,20,1,20,1,nm$
  6. 50 print:print"hello, "nm$
  7. 60 print"do you like this input (y/n) y"
  8. 70 sys49152,10,29,1,1,0,a$
  9. 80 ifa$<>"y"anda$<>"n"then70
  10. 100 print"[147]multiple choice example:":print
  11. 110 fori=1to9:print"question #"str$(i)". answer (y/n):":next
  12. 120 sys49152,2,28,9,1,0,rp$
  13. 130 fl=0:fori=1tolen(rp$):ifmid$(rp$,i,1)<>"y"andmid$(rp$,i,1)<>"n"thenfl=1
  14. 140 nexti:ifflthen120
  15. 150 print:print:print"answer string:"rp$
  16.