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,724 of 56,720   
   I am Rob to All   
   Re: Displaying text file from Applesoft   
   12 Apr 21 20:47:10   
   
   From: gids.rs@sasktel.net   
      
   > Is there a more elegant way to display text files in Applesoft besides:   
   >   
   > 10 onerr goto 100   
   > 20 input fn$   
   > 30 ?chr$(4);"open ";fn$   
   > 40 ?chr$(4);"read ";fn$   
   > 50 input a$   
   > 60 print a$   
   > 70 goto 50   
   > 100 ?chr$(4);"close"   
   >   
   > Waiting for an error seems....not the best way.   
      
      
   A couple of other methods come to mind.  There are commands which can be   
   installed into either DOS or ProDOS, such that one can just use:  ?   
   CHR$(4)"TYPE textfilename".   
      
   Under ProDOS one can also just use BLOAD, as in:   
      
   LN = ?? : REM enter length of text file when doing a CATALOG or get length   
   from Basic.System   
   ? CHR$(4)"BLOAD textfile,TTXT,A$2000" : FOR I=0 to LN-1: ? PEEK(8192+I);:NEXT   
      
   I think there is also a way to BLOAD a textfile under DOS 3.3 but it has been   
   too long.   
      
   --- 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