Open or close a text file for use by the HB_F* functions
HB_FUse( [ <cFile> ] [, <nMode> ] ) -> nHandle | NIL
<cFile> : is the text file you want to open. If not specified, the file currently open, if any, will be closed.
<nMode> : is the open mode for the file. Please refer to the discussion of open modes under FOPEN() and FILEIO.CH for a list of allowable open modes. If not specified, the file will be opened with a mode of FO_READ + FO_SHARED (64).
If <cFile> is passed and the file is opened successfully, an integer containing the file handle. If the file cannot be opened, -1 will be returned.
If HB_FUse() is called without any arguments, it will close the text file in the current “text area” and return NIL.
Some of HB_F*() file functions are for reading text files, that is, files where each line (record) is delimited by a CRLF pair.
Each file is opened in its own “workarea”, similar to the concept use by dbf files. As provided, a maximum of 10 files (in 10 workareas) can be opened (assuming there are sufficient file handles available).
HB_FUse( "test.txt" ) // open text file DO WHILE ! HB_FEOF() ? HB_FReadLn() HB_FSkip() ENDDO HB_FUse() // close file