Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.sys.apple2    |    Discussion about Apple II micros    |    56,720 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 54,726 of 56,720    |
|    duhast6377@gmail.com to mmphosis    |
|    Re: Displaying text file from Applesoft    |
|    13 Apr 21 15:24:00    |
      From: duhas...@gmail.com              On Monday, April 12, 2021 at 11:45:36 PM UTC-4, mmphosis wrote:       > If only you knew how many characters were in the text file beforehand. Error       > handling is inelegant. Gracefully handle the End Of File (EOF)       >       > 0 D$ = CHR$(4)       > REM 10 PRINT D$"NOMONC,I,O"       > 20 INPUT F$       > 30 PRINT D$"VERIFY"F$       > 40 M$ = CHR$(13)       > 50 PRINT D$"OPEN"F$M$D$"READ"F$       > 60 ONERR GOTO 100       > 70 GET C$       > 80 PRINT M$C$;       > 90 GOTO 70       > 100 POKE 216,0       > 120 EOF = PEEK(222) = 5       > 130 IF NOT EOF THEN RESUME       > 140 PRINT D$"CLOSE"       >       > FN is a keyword.       > INPUT won't handle long lines.       > INPUT will ignore extra characters from where a comma or a colon starts in       > the line.       > PRINT M$C$; might be a DOS 3.3 thing, I didn't test this in ProDOS.              I'm using Prodos, and I could know how many characters are in the file as it       will be a fixed help menu. If I know ahead of time would I just use a for       next loop?              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca