CLS PRINT "Text Editor" 1 PRINT INPUT "Please enter the path and name of the file ", p$ IF p$ = "" THEN GOTO 2 OPEN p$ FOR INPUT AS #1 PRINT "The text of your file is:" PRINT WHILE NOT EOF(1) INPUT #1, a$ PRINT a$ WEND PRINT PRINT "What would you like?" PRINT " 1.Append a text" PRINT " 2.ReWrite the text" PRINT " 3.Delete this file" INPUT choose IF choose = 1 THEN GOTO app ELSE IF choose = 2 THEN GOTO renew ELSE IF choose = 3 THEN GOTO del ELSE PRINT "Not" END 2 PRINT PRINT "Bad file name" PRINT "Please insert the correct path . Example : X:\XXX.TXT" GOTO 1 app: PRINT "Type the text that you want to append it to this file.For end please type \end\ to a new line and press enter:" PRINT CLOSE #1 OPEN p$ FOR APPEND AS #1 b = 0 DIM char$(1000) 7 b = b + 1 INPUT "", char$(b) IF char$(b) = "\end\" THEN char$(b) = "" GOTO appendtxt ELSE GOTO 7 END IF appendtxt: PRINT 8 INPUT "Do you want to append this text to file? (n/y) ", ans$ IF ans$ = "n" THEN GOTO 1 FOR I = 1 TO b PRINT #1, char$(I) NEXT I END renew: CLOSE #1 OPEN p$ FOR OUTPUT AS #1 PRINT "Type the text that you want to write it to this file.For end please type \end\ to a new line and press enter:" PRINT CLOSE #1 OPEN p$ FOR APPEND AS #1 b = 0 9 b = b + 1 INPUT "", char$(b) IF char$(b) = "\end\" THEN char$(b) = "" GOTO writetxt ELSE GOTO 9 END IF writetxt: PRINT 10 INPUT "Do you want to ReWrite this text to file? (n/y) ", ans$ IF ans$ = "n" THEN GOTO 1 FOR I = 1 TO b PRINT #1, char$(I) NEXT I END del: CLOSE #1 KILL p$ END