TIP: Click on subject to list as thread! ANSI
echo: quik_bas
to: DAVID WILLIAMS
from: BILL WHITE
date: 1998-04-09 17:13:00
subject: Multiple eofs

DW> obviously the correct place to stop. There is no way that a user,
DW> working "through" the DOS, can stick EOFs into the middle of a file,
     Oh, yes there is - very easy.  Run the following:
    -------------------------8<------------------------
OPEN "D:\test.dat" FOR OUTPUT AS #2
FOR i = 1 TO 10
    PRINT #2, i; "Bill White"
    IF i = 5 THEN PRINT #2, CHR$(26)
NEXT i
CLOSE
OPEN "D:\test.dat" FOR INPUT AS #1
DO UNTIL EOF(1)
    LINE INPUT #1, l$
    PRINT l$
LOOP
CLOSE
    -------------------------8<------------------------
     It quite at line 5, where the CHR$(26) is, because
that's the "end of the file" character!  LIST can read
it all, WordPerfect and EDIT stop on line 5.
  FIDO: Bill White @ 1:135/110 (Miami)
 InterNet: bill.white@110.sunshine.com
 * SLMR 2.1a * Neither rain nor snow nor line nois~^+*)*&#!$#NO CARRIER!
--- Maximus 2.01wb
---------------
* Origin: Miami Amateur Computer Club BBS/USR Courier V.E (1:135/110)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.