RosettaCodeData/Task/Palindrome-detection/Fortran/palindrome-detection-3.f
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

9 lines
252 B
Forth

recursive function is_palindro_r (t) result (isp)
implicit none
character (*), intent (in) :: t
logical :: isp
isp = len (t) == 0 .or. t (: 1) == t (len (t) :) .and. is_palindro_r (t (2 : len (t) - 1))
end function is_palindro_r