Returns the next available BASIC file number.
FREEFILE
FREEFILE
eliminates the need to hard-code file numbers and, accordingly, the risk of using a file number already in use.
filenumber = FREEFILE
OPEN "TEST.DAT" FOR OUTPUT AS filenumber
CLOSE filenumber