Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

string lengths

Scott_L_
New Contributor I
298 Views

How does intel Fortran on Linux handle string length arguments, mixed string length or all at the end of arg list?   Is there an option?  I did not see it in the man page.  on windows, there is /iface:mixed_str_len_args 

thanks

Scott

 

0 Kudos
4 Replies
mecej4
Honored Contributor III
298 Views

The compiler user guide explicitly states: "No equivalent on Linux* or OS X* systems".

On Windows, Intel Fortran wants to support old code written for Compaq Visual Fortran, which used mixed string length arguments. On the other OSes, there is no corresponding need.

0 Kudos
Scott_L_
New Contributor I
298 Views

Thanks-- is there a compiler user guide on Linux. or just the man page?  If there is, where do I find it?

scott

 

 

0 Kudos
mecej4
Honored Contributor III
298 Views

If the person who installed Parallel Studio allowed it to be installed, the documentation should be in the compiler directories at /opt/intel. You can see the documentation on-line at https://software.intel.com/en-us/intel-fortran-compiler-17.0-user-and-reference-guide, and the compiler options list at https://software.intel.com/en-us/node/677967.

0 Kudos
Steve_Lionel
Honored Contributor III
298 Views

I will also comment that the string length is an address-sized integer, passed by value. This is important if you are calling from other languages and not using the C interoperability features of Fortran. I often see complaints of problems where the programmer passed an "int" from C as the length on a 64-bit platform. But also be aware that such hidden arguments are implementation-dependent and making use of them is not good practice. Intel Fortran supports the full Fortran 2015 extended C interoperability features, including "C descriptors" for arbitrary-length character arguments.

0 Kudos
Reply