Fortran function returning incorrect type based on function name

From: Alan Brammer <abrammer_at_nyahnyahspammersnyahnyah>
Date: Wed Dec 04 2013 - 20:22:47 MST

Hi all,

        I have 2 iterations of the exact same code below.  One function named “abcd" that returns a float as expected, one function named “lbcd" which incorrectly returns an integer, though not even the nearest integer but just zero. 

I’ve narrowed this down to whether or not the function begins with the letter l ?

The returned xx value is correct, but the function value returned is the issue. 

I imagine this is an issue with WRAPIT possibly, so below is the version I have.  I’ve never noticed the below syntax error in `WRAPIT -d` and wrapped routines typically work as expected. 

 
WRAPIT Version: 120209
OPERATING SYSTEM: Linux
nbits = 64
FORTRAN COMPILER (f90c): gfortran
FORTRAN COMPILER OPTIONS (fopts):  -m64 -fPIC -v -c -fno-second-underscore
A syntax error occurred while parsing: 
gcc -fPIC -m64 -c -I/ct12/abrammer/ncl6.1.2//include WRAPIT.c
SHARED OBJECT NAME (SharedObj): NONE
LINKER SUFFIX (ld_suffix): WRAPIT.o -o NONE
 
LINKING
gcc -m64 -fPIC -shared WRAPIT.o -o NONE -lgfortran
END WRAPIT

Thanks,
        Alan.

p.s. The code here is trivial and getting the result is not the issue. 

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Wed Dec 4 20:23:10 2013

This archive was generated by hypermail 2.1.8 : Fri Dec 13 2013 - 11:39:30 MST