C_Desc.f90 547 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module C_DescMod

  use iso_c_binding
  
  implicit none
  public
  
  interface
    subroutine C_Desc ( A ) bind ( c, name = 'C_Desc' )
      use iso_c_binding
      implicit none
      real, dimension ( :, :, : ), allocatable, &
        intent ( out ) :: &
          A
    end subroutine C_Desc
  end interface
  
end module C_DescMod

program C_DescProg
  
  use C_DescMod
  implicit none
  
  real, dimension ( :, :, : ), allocatable :: &
    Array

  print*, 'Fortran: rank:', rank ( Array )
  call C_Desc ( Array )
  
end program C_DescProg