CHARACTERs in Fortran are just pointers of type char*, just like in C, and just like any other fortran array. There is no terminating null and the fortran functions get the length either from some argument or because they assume a given size (for instance in Lapack it is a one-character string what the function expects)
Hi,
I am trying to call the FORTRAN routine ILAENV in LAPACK [1] from CL,
using CFFI. It has CHARACTER*(*) arguments, and I am not sure how to
handle these. I found a lot of conflicting information on the web,
including examples which used C-style zero-terminated strings [2], and
others which mention string length as an extra argument to the
function.
Any kind of guidance on how to do this would be appreciated.
Thanks,
Tamas
[1] http://www.netlib.org/lapack/util/ilaenv.f
[2] http://www.ualberta.ca/AICT/RESEARCH/LinuxClusters/doc/acml350/
ILAENV_002dILAENVSET.html
_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel