home bbs files messages ]

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,723 of 56,720   
   mmphosis to All   
   Re: Displaying text file from Applesoft   
   13 Apr 21 03:45:34   
   
   From: mmphosis@macgui.com   
      
   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.   
      
   --- 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