The TIME_OF_INTEGER function converts a time in 100th-of-a-second form to a time in the form (HHMMSShh). The type of this function is integer.
The functionality is identical to the COBOL85 function TIME-OF-INTEGER.
Explanation
The one parameter to this function is a positive integer that represents the number of 100th-of-a-seconds into the day.
An invalid argument will return a value of 0 (zero).
The returned value represents the time equivalent of the integer parameter in the form (HHMMSShh) where,
|
In the representation YYYYMMDD, . . . |
Represents . . . |
|
HH |
Represents the hour in 24-hour format. |
|
MM |
Represents the minute. |
|
SS |
Represents the second. |
|
hh |
Represents the 100ths of a second. |
Example
BEGIN
$ INCLUDE INTL = "*SYMBOL/INTL/ALGOL/PROPERTIES." 10000000 - 89999999
EBCDIC ARRAY OUT[0:100];
EBCDIC ARRAY A[0:20];
POINTER P;
INTEGER HHMMSShh;
INTEGER IOT, TOI;
P := OUT[0];
CURRENT_DATE(A);
HHMMSShh := INTEGER(A[8],8);
IOT := INTEGER_OF_TIME(HHMMSShh);
TOI := TIME_OF_INTEGER(IOT);
REPLACE P BY "HHMMSShh=", HHMMSShh FOR 8 DIGITS,
"INTEGER_OF_TIME=", IOT FOR 7 DIGITS,
" TIME_OF_INTEGER=", TOI FOR 8 DIGITS, 0 FOR 1;
DISPLAY(P);
END.
If run at 3:16 PM the program would display:
HHMMSShh=15163630 INTEGER_OF_TIME=5499630 TIME_OF_INTEGER=15163630

