subroutine func01( a ) bind(C,name="func01")
implicit none
character(len=30), dimension(3) , intent(in) :: a
print *
print *, "char length = ", len(a(1)), len(a(2)), len(a(3))
print *, "raw a(1) : [", a(1), "]"
print *, "raw a(2) : [", a(2), "]"
print *, "raw a(3) : [", a(3), "]"
print *, "trim : [", trim(a(1)), "] [", trim(a(2)), "] [", trim(a(3)), "]"
end
When I try to compile the above code I get the following messages:
gfortran source3.f90
source3.f90:1.20:
subroutine func01( a ) bind(C,name="func01")
1
Warning: Variable 'a' at (1) is a parameter to the BIND(C) procedure 'func01' bu
t may not be C interoperable
source3.f90:1.20:
subroutine func01( a ) bind(C,name="func01")
1
Error: Character argument 'a' at (1) must be length 1 because procedure 'func01'
is BIND(C)
Can you please tell me on how to get rid of the messages?