PI1X Basic Programming Manual Ver. 1.10
77/156
Purpose
:
To delete a folder.
Syntax
:
R% = RMDIR foldername$
Example
:
FolderPath$="C:\ARGOX\"
Result%=RMDIR FolderPath$
Description
:
R%
is an integer variable to be assigned to the result.
R%
Meaning
0
Delete folder failed.
1
Delete folder successfully.
foldername$
is a string variable, indicating the folder path.
Purpose
:
To close a file.
Syntax
:
CLOSE # F%
Example
:
CLOSE # FILEID%
Description
:
F%
is an integer indicating the file handle.
You can use the GET_FILE_ERROR command to get the
file error code. Possible error codes and their interpretation
are listed below:
GET_FILE_ERROR Meaning
2
File specified does not exist.
8
File not opened
Purpose
:
To read a byte from a file. The current position is updated
after reading.
Syntax
:
STR% = BGET # FILEID%
Example
:
STRING1%=BGET # FILEID%
PRINT CHR$(STRING1%)
Description
:
STR%
is an integer variable to be returned to the result.
FILEID%
is an integer variable indicating the file handle.
You can use the GET_FILE_ERROR command to get the
file error code. Possible error codes and their interpretation
are listed below:
GET_FILE_ERROR Meaning
2
File specified does not exist.
7
File not opened