Portability Subroutine: Returns the date.
USE IFPORT
CALL GETDAT (iyr, imon, iday)
iyr |
(Output) INTEGER(4) or INTEGER(2). Year ( xxxxAD). |
imon |
(Output) INTEGER(4) or INTEGER(2). Month (1-12). |
iday |
(Output) INTEGER(4) or INTEGER(2). Day of the month (1-31). This subroutine is thread-safe. |
CONSOLE STANDARD GRAPHICS QUICKWIN GRAPHICS DLL LIB
! Program to demonstrate GETDAT and GETTIM
USE IFPORT
INTEGER(4) tmpday, tmpmonth, tmpyear
INTEGER(4) tmphour, tmpminute, tmpsecond, tmphund
CHARACTER(1) mer
CALL GETDAT(tmpyear, tmpmonth, tmpday)
CALL GETTIM(tmphour, tmpminute, tmpsecond, tmphund)
IF (tmphour .GT. 12) THEN
mer = 'p'
tmphour = tmphour - 12
ELSE
mer = 'a'
END IF
WRITE (*, 900) tmpmonth, tmpday, tmpyear
900 FORMAT(I2, '/', I2.2, '/', I4.4)
WRITE (*, 901) tmphour,tmpminute,tmpsecond,tmphund,mer
901 FORMAT(I2, ':', I2.2, ':', I2.2, ':', I2.2, ' ',&
A, 'm')
END