The following program gives a non-justified compilation warning:
! [JvO] 2005-09-01 Dattim.f95 subroutine dattim(t) implicit NONE integer, optional, intent(OUT) :: t integer, dimension(6) :: hms character(len=12) :: d_v, t_v
call date_and_time(d_v, t_v)
if (present(t)) then
read(d_v, '(I4,2I2)') hms(1:3)
read(t_v, '(3I2)') hms(4:6) !
t = dot_product(hms, (/ 0, 0, 86400, 3600, 60, 1 /))
end if
d_v(5: ) = '-' // d_v(5:6) // '-' // d_v(7:8)
t_v(3: ) = ':' // t_v(3:4) // ':' // t_v(5:9)
end subroutine dattim
! D:\Fortran\Test\Salford>ftn95 /check dattim ! [FTN95/Win32 Ver. 4.8.0 Copyright (C) Salford Software Ltd 1993-2005] ! 0005) integer, dimension(6) :: hms ! WARNING - Variable HMS has been used without being given an initial value ! NO ERRORS, 1 WARNING [<DATTIM> FTN95/Win32 v4.8.0]