Crestron simpl plus language ref 사용자 설명서

다운로드
페이지 374
Software Crestron 
SIMPL+
®
134 
z SIMPL+
®
Language Reference Guide - DOC. 5797G
FileGetYearNum
Name:
FileGetYearNum
Syntax:
SIGNED_INTEGER FileGetYearNum(FILEINFO Info);
Description:
Returns an integer corresponding to the year of the file.
Parameters:
INFO – structure containing the information about a found file (refer to "FindFirst" 
on page 
Return Value:
The year as an integer. The full year is specified. For example, the year 2000 will 
return the integer 2000.
Example: 
(Refer to "File Functions Overview"on page 
)
INTEGER NumYear;
FILE_INFO FileInfo; 
SIGNED_INTEGER Found;
StartFileOperations();
Found = FindFirst(“*.dat”, FileInfo );
WHILE (Found = 0)
{
NumYear = FileGetYearNum(FileInfo);
PRINT ( “Year of file date = %d\n”, NumYear);
Found = FindNext(FileInfo);
}
IF ( FindClose() < 0 ) 
PRINT ( “Error in closing find operation\n” );
EndFileOperations();
An example output from this would be “Year of file date = 2002”.
Version:
SIMPL+ Version 3.00.02 or higher (Pro 2 only)
Control System:
2-Series Only