AWCTTYPA@UIAMVS.BITNET ("David A. Lyons") (06/10/88)
>From: Michael Williams <tramp!williamm@boulder.colorado.edu> >Subject: DOS 3.3 Text Files >As a simple example, the following append >program won't work for me. Why not? >100 PRINT "APPENDING F2 TO F1:":PRINT >110 PRINT CHR$(4);"OPEN F2" >120 PRINT CHR$(4);"READ F2" >130 PRINT CHR$(4);"APPEND F1" >140 PRINT CHR$(4);"WRITE F1" >150 ONERR GOTO 500 >160 INPUT X$ >170 PRINT X$; >180 GOTO 160 >500 PRINT CHR$(4);"CLOSE" >510 PRINT "DONE APPENDING" That won't work; every CHR$(4) command cancels any other CHR$(4) command already in effect. You'll have to do a "READ F2" right before the INPUT, and a "WRITE F1" right before the PRINT. Note that you should NOT have a semicolon after that PRINT if you really want to append the files--there won't be any carriage returns added to the file with the semicolon there. >Thanks, >Remo >BIT: WILLIAMS_MS%CUBLDR@VAXF.COLORADO.EDU --David A. Lyons a.k.a. DAL Systems PO Box 287 | North Liberty, IA 52317 BITNET: AWCTTYPA@UIAMVS CompuServe: 72177,3233 GEnie mail: D.LYONS2