KILL permanently deletes a file.
OPEN file FOR OUTPUT erases any old file of the same name and creates a blank one.
One gets rid of a file, the other just blanks it — which is two different things.
If you check some of my programs, you’ll see I use this trick a lot:
OPEN “temp.txt” FOR OUTPUT AS #1: CLOSE
OPEN “temp.txt” FOR BINARY AS #1
Since I tend to use the same filename over and over for temporary files, for testing purposes, I’ve developed the OUTPUT-BINARY style to make certain the current file I’m starting with is blank and doesn’t hold previous, unwanted data. A similar process would be:
IF _FILEEXISTS(“temp.txt) THEN KILL “temp.txt”
OPEN “temp.txt” FOR BINARY AS #1
I just find the first preferable, as I can copy/paste that line and just change output to binary and be done with it, rather than having to type both lines, but both will basically work for the same purpose here. ;)
Since you’re just blanking old information, either KILL or OUTPUT will work for your needs, so just choose whichever seems the most natural to you.