	RECURSIVE FUNCTION fac(N) RESULT(facResult)  !! You need RESULT clause
	 IMPLICIT NONE

	 INTEGER :: facResult		!! Return type
	 INTEGER, INTENT(IN) :: N

	 if ( N == 1 ) then
	    facResult = 1
	 else
	    facResult = N * fac(N-1)
	 end if
	END FUNCTION

! ================================================================

	PROGRAM myProg
	 IMPLICIT NONE
	 INTEGER fac

	 PRINT *, "Fac(4) = ", fac(4)
	 PRINT *, "Fac(10) = ", fac(10)

	END
	
