Crestron simpl plus language ref 사용자 설명서
Crestron SIMPL+
®
Software
Language Reference Guide - DOC. 5797G
SIMPL+
®
z 121
FileBOF
Name:
FileBOF
Syntax:
SIGNED_INTEGER FileBOF (INTEGER handle)
Description:
Tests whether or not the current file pointer is at the beginning of the file.
Parameters:
HANDLE specifies the file handle of the previously opened file (from FileOpen).
Return Value:
Returns 1 if beginning of file or 0 if not end of file. Otherwise, file error code is
returned.
returned.
Example:
(Refer to "File Functions Overview"on page
)
SIGNED_INTEGER nFileHandle;
StartFileOperations();
nFileHandle = FileOpen ( “MyFile”, _O_RDONLY );
IF (nFileHandle < 0)
{
PRINT(“Error Opening File MyFile\n”);
return;
}
IF ( FileBOF ( nFileHandle ) = 1 )
PRINT ( “Beginning of file reached\n” );
IF ( FileClose ( nFileHandle ) <> 0 )
PRINT ( “Error closing file” );
EndFileOperations();
Version:
SIMPL+ Version 3.00.02 or higher (Pro 2 only)
Control System:
2-Series Only