compiler user's guide question

compiler user's guide question

john.fluharty's picture

The Compiler User's Guide for the 7.1 version of the compiler had a section called "Mixing C and Fortran". Can someone tell me where this information is in the documentation for compiler version 8?

I have found some stuff in the "System User's Guide Volume 1: Building Applications" but its not the same.

Specifically, in the version 7.1 manual "Compiler User's Guide" within the section "Mixing C and Fortran" is a section called "Calling C Pointer-type" Function from Fortran". There, it talks about using a hidden argument when returning a fortran pointer-type from a C function. I wanted to confirm that this works the same way with the version 8 compiler, because it seems like the argument is first instead of last in the argument list.

Quoting the text from the Compiler User's Guide for version 7.1 states:

"The hidden argument comes at the end of the argument list, if there are other arguments, and after the hidden lengths of any character arguments."

So, is this still true?

More importantly, where does this section in the manuals distributed with the version 8 compiler?



Related to this, is there a way to tell the compiler not to pass this hidden argument, put to just accept the return value as a pointer type?

3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
Steve Lionel (Intel)'s picture

It's in a "programming with mixed languages" section of Volume 1 of the User's Guide.

Are you sure you aren't looking at a description of where character argument lengths are passed? I can't imagine that the function return value would have been at the end of the list, but I admit that I am not familiar with this part of 7.1.

Steve
john.fluharty's picture

Yea, I'm sure. I should have just posted the link before:
http://padmin1.ncsa.uiuc.edu/auxdocs/intelcompiler/f_ug/for-ug_lnx.htm#m...

I've read the section you refer to, but I didn't see anything in there that talks about using a fortran pointer as a return value from a C function.

Message Edited by john.fluharty on 01-22-2004 12:20 PM

Login to leave a comment.