fortran subroutine problem

From: jerry <jerry_at_nyahnyahspammersnyahnyah>
Date: Wed, 29 Mar 2006 11:34:05 +0800

Hi

i need to call the fortran subroutine and wish it could return
a one dimension array of type string .
the code like below :

ncl code : (test.ncl)
 external EX01 "./ex01.so"
begin

    var = new(3,string)
     EX01::getstr(var)
     print(var)

 end

 fortran code : (a.f)
 subroutine getstr(s)
 character*3 s(3)
  s(1) = "aaa"
  s(2) = "bbb"
  s(3) = "ccc"

  end

  ex01.wib code
C NCLFORTSTART
    subroutine getstr(s)
    character*3 s(3)
C NCLEND

when i run the ncl scripts it will show the error message :
fatal : Argument type mismatch on argument (0) of (getstr) can not coerce
fatal : Execute : Error occurred at or near line 9 in file test.ncl

Thank you for help!!

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 28 2006 - 20:34:05 MST

This archive was generated by hypermail 2.2.0 : Thu Mar 30 2006 - 15:04:23 MST