Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!waikato.ac.nz!comp.vuw.ac.nz!actrix!David.Empson From: David.Empson@actrix.gen.nz (David Empson) Newsgroups: comp.sys.apple2 Subject: Re: Text files & BASIC Message-ID: <1991Jun25.134351.25700@actrix.gen.nz> Date: 25 Jun 91 13:43:51 GMT References: <1991Jun25.050640.19679@crash.cts.com> Organization: Actrix Information Exchange, Wellington, New Zealand Lines: 24 Comment-To: bill@pro-gateway.cts.com In article <1991Jun25.050640.19679@crash.cts.com> bill@pro-gateway.cts.com (Bill Long, SysOp) writes: > Is there a way, in AppleSoft BASIC, to READ from a text file for a while, > then pause reading for a while and take input from the keyboard and put > output to the screen, and then continue READing from where you left off? > > Thanx. > > ---- > Internet: bill@pro-gateway.cts.com To stop reading from a text file, do any ProDOS command, using PRINT D$. For example: 10 D$=CHR$(4) 20 PRINT D$;"OPEN TEXTFILE" 30 PRINT D$;"READ TEXTFILE" 40 INPUT L$: REM L$ is read from the text file 50 PRINT D$: REM stop reading from the text file 60 INPUT "What next? ";A$: REM this will read from the keyboard 70 IF A$<>"STOP" THEN GOTO 30 80 PRINT D$;"CLOSE" -- David.Empson@bbs.actrix.gen.nz