mirror of
https://github.com/VictorEijkhout/TheArtOfHPC_vol3_cppf08programming.git
synced 2026-01-24 22:44:48 +09:00
34 lines
689 B
Fortran
34 lines
689 B
Fortran
!****************************************************************
|
|
!***
|
|
!*** This file belongs with the course
|
|
!*** Introduction to Scientific Programming in C++/Fortran2003
|
|
!*** copyright 2017 Victor Eijkhout eijkhout@tacc.utexas.edu
|
|
!***
|
|
!*** interface.F90 : explicit interfaces
|
|
!***
|
|
!****************************************************************
|
|
|
|
Program HasInterface
|
|
implicit none
|
|
integer :: i
|
|
|
|
!!codesnippet interfacemain
|
|
interface
|
|
function f(x,y)
|
|
real*8 :: f
|
|
real*8,intent(in) :: x,y
|
|
end function f
|
|
end interface
|
|
|
|
real*8 :: in1=1.5, in2=2.6, result
|
|
|
|
result = f(in1,in2)
|
|
!!codesnippet end
|
|
print *,result
|
|
|
|
|
|
end Program HasInterface
|
|
|
|
|
|
|