program mlp8 use, intrinsic :: iso_c_binding implicit none interface real(c_float) function mean(a,b) bind(c,name='mean') use, intrinsic :: iso_c_binding REAL (c_float), value :: a, b end function mean end interface REAL :: a, b, c a = 1.0 b = 3.0 c = mean(a,b) write (*,*) ' Mean value computed by C is ', c end program mlp8