HTBasic Help
×
Menu
Index
Files
 
A file is opened when the ASSIGN statement assigns a file-specifier. The file’s position pointer is set to the beginning by default, but can set to the end with the APPEND option. The file position is updated to point to the next byte to be written or read after each ENTER or OUTPUT statement. The ASSIGN statement will not CREATE a file if it does not exist. You should use the CREATE statement before you ASSIGN the file if it does not yet exist.
 
CREATE "MyData.dat",1         ! Creates the file in the current folder (set by MSI or CD)
ASSIGN @File TO "MyData.dat"  ! Opens the file and assigns it to an I/O path variable