Argox PA-20 Basic Programming Manual Manuale Utente Pagina 76

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 143
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 75
PT-Basic Programming Manual Ver. 1.00 75/143
3.15 File manipulation commands
3.15.1 Standard Commands
Access mode string
Meaning
r
Opens file for reading operation only. Error will be returned
if target file does not exist.
r+
Opens existing files for both reading and writing operations.
Error will be returned if target file does not exist.
w+
Create a file and open it for both reading and writing. If
target file does exist, current contents are destroyed.
OPENIN
Purpose
To open (r mode) a file and get the file for further
processing.
Syntax
F% = OPENIN filename$
Example
FilePath$="C:\DATA\Test.DAT"
fileID%=OPENIN FilePath $
Description
F% is an integer variable to assigned to the result.
F%
Meaning
0
Open file fail.
Other
Open successfully.
It returns the file handle.
filename$ is a string variable indicating the file path.
In case of error, open will return an integer value of 0. 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
1
Filename is a NULL string.
6
Can't create file because the
maximum number of files
allowed in the system is
exceeded.
File path error.
Vedere la pagina 75
1 2 ... 71 72 73 74 75 76 77 78 79 80 81 ... 142 143

Commenti su questo manuale

Nessun commento