
Reserved Identifiers
125
NetLinx Programming Language Reference Guide
Keywords & Run-Time Library Functions (Cont.)
FILE_SETDIR
This function sets the current working directory to the specified path.
SLONG FILE_SETDIR (CHAR DirPath[ ])
Parameters:
•
DirPath
: String containing the directory path.
Result:
• 0: Operation successful
• -4: Invalid directory path
• -5: Disk I/O error
Result = FILE_SETDIR ('\CDLIST\TEMP\')
FILE_WRITE
This function writes a block of data to the specified file.
SLONG FILE_WRITE (LONG hFile, CHAR Buffer[ ], LONG BufLen)
Parameters:
•
hFile
: Handle to the file returned by File_Open.
•
Buffer
: Buffer containing the data to write.
•
BufLen
: Number of bytes to write.
Result:
• >0: The number of bytes actually written
• -1: Invalid file handle
• -5: Disk I/O error
• -6: Invalid parameter (buffer length must be greater than zero)
• -11: Disk full
The data will overwrite or append to the current contents of the file depending
on the current position of the file pointer.
CHAR Buffer[1024]Result = FILE_WRITE (hFile, Buffer,
1024)
FILE_WRITE_LINE
This function writes a line of data to the specified file.
SLONG FILE_WRITE_LINE (LONG hFile, CHAR Line[ ], LONG
LineLen)
Parameters:
•
hFile
: Handle to the file returned by File_Open.
•
Line
: Buffer containing the line of data to write.
•
LineLen
: Number of bytes to write.
Result:
• >0: The number of bytes actually written
• -1: Invalid file handle
• -5: Disk I/O error
• -6: Invalid parameter (LineLen must be greater than zero)
• -11: Disk full
A <CR><LF> character pair is automatically appended to the end of the line.
CHAR Line[80]Result = FILE_WRITE_LINE (hFile, Line, 80)
Содержание NETLINX PROGRAMMING LANGUAGE
Страница 15: ...Table of Contents xiii NetLinx Programming Language Reference Guide...
Страница 16: ...xiv NetLinx Programming Language Reference Guide Table of Contents...
Страница 18: ...Introduction 2 NetLinx Programming Language Reference Guide...
Страница 76: ...Language Elements 60 NetLinx Programming Language Reference Guide...
Страница 106: ...Combining Devices Levels and Channels 90 NetLinx Programming Language Reference Guide...
Страница 112: ...Master To Master M2M 96 NetLinx Programming Language Reference Guide...
Страница 114: ...Mainline 98 NetLinx Programming Language Reference Guide FIG 1 Message and Mainline Processing in the NetLinx System...
Страница 182: ...Reserved Identifiers 166 NetLinx Programming Language Reference Guide...
Страница 204: ...NetLinx UniCode Functions 188 NetLinx Programming Language Reference Guide...
Страница 244: ...Appendix B Glossary 228 NetLinx Programming Language Reference Guide...
Страница 245: ...Appendix B Glossary 229 NetLinx Programming Language Reference Guide...