!     Last change:  ZZZ  16 Sep 2006    2:31 pm


! this is a comment 

module mySubroutines
        implicit none
        contains

        subroutine BasicArithmetic(x,y,sum1,diff,prod,ratio)
        	DOUBLE PRECISION, INTENT(IN) :: x,y !Variable declaration
       		DOUBLE PRECISION, INTENT(OUT) :: sum1, diff, prod, ratio
                sum1 = x + y
                diff = x - y
                prod = x * y
                ratio = x / y
		end subroutine


end module

program hello
        USE mySubroutines
        implicit none
        INTEGER, EXTERNAL :: add1
        INTEGER :: sum2
        DOUBLE PRECISION :: x1,y1,sum1,diff,prod,ratio

		PRINT *, "Hello World!"


        x1 = 12.0
        y1 = 4.0
        CALL BasicArithmetic(x1,y1,sum1,diff,prod,ratio)

        PRINT *, "sum1", sum1
        PRINT *, "diff", diff
        PRINT *, "prod", prod
        PRINT *, "ratio", ratio


        sum2 = add1(3,4)
        PRINT *, "The sum is",sum2
        PRINT *, "Or",add1(3,4)


end program

INTEGER function add1(x,y)
        implicit none
        INTEGER, INTENT(IN) :: x,y
        add1 = x+y

end function add1


