I often use this piece of program in my codes.
Some compilers insist that this is a recursive library call.
Is it really?
!-----------------------------------
program test
print *, the_date()
contains
function the_date() result( day)
implicit none
character( LEN=17) :: day
character(len=8) :: date
character(len=10) :: time
call DATE_AND_TIME( date, time)
write( day, '(a7,a2,a1,a2,a1,a4)') &
'Date : ', date(7:8), '/', date(5:6), '/', date(1:4)
end function the_date
end program test
!-----------------------------------
It does not seem to me to be "more recursive" than
a = MAX( b, MAX( c, d))
which always works.
Bertrand Meltz
|