Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Crestron SIMPL+
®
Software 
Language Reference Guide - DOC. 5797G
 SIMPL+
®
 
z 127
FileEOF
Name:
FileEOF
Syntax:
SIGNED_INTEGER FileEOF (INTEGER handle) 
Description:
Tests whether or not the current file pointer is at the end of the file.
Parameters:
HANDLE specifies the file handle of the previously opened file (from FileOpen).
Return Value:
Returns 1 if end of file or 0 if not end of file. Otherwise, file error code is returned.
Example: 
(Refer to "File Functions Overview"on page 
)
SIGNED_INTEGER nFileHandle;
nFileHandle = FileOpen ( “MyFile”, _O_RDONLY );
IF (nFileHandle < 0)
{
PRINT(“Error Opening File MyFile\n”);
return;
}
IF ( FileEOF ( nFileHandle ) = 1 ) 
PRINT ( “End of file reached\n” );
IF ( FileClose ( nFileHandle ) <> 0 ) 
PRINT ( “Error closing file\n” ); 
Version:
SIMPL+ Version 3.00.02 or higher (Pro 2 only)
Control System:
2-Series Only