fortran - Error: Character argument 'a' at (1) must be length 1 because procedure is BIND(C) -


subroutine func01( ) bind(c,name="func01")   implicit none   character(len=30), dimension(3) , intent(in) ::      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 try compile above code following messages:

gfortran source3.f90  source3.f90:1.20:  subroutine func01( ) bind(c,name="func01")                     1 warning: variable 'a' @ (1) parameter bind(c) procedure 'func01' bu t may not c interoperable source3.f90:1.20:  subroutine func01( ) bind(c,name="func01")                     1 error: character argument 'a' @ (1) must length 1 because procedure 'func01'  bind(c) 

can please tell me on how rid of messages?


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -