filecreate

Creates a file.

filecreate <file handle> <filename>

Remarks

Creates and opens a new file specified by <filename>.
The file pointer is set to the beginning of the file. If file <filename> already exists, its size is truncated to zero.
If the file is successfully created and opened, the file handle is returned in the integer variable <file handle>. Otherwise, <file handle> is set to -1.
If the file is created successfully, the system variable "result" is set to 0. Otherwise, "result" is set to non-zero.

Also, the file handle is opening after creation a file.

Example

filecreate fhandle 'data.dat'
fileclose fhandle