Frequently asked question

Can a C array (type double) be passed to a FORTRAN program (type real*8)?

Last Published: April 25, 2020

Answer

Yes, it can. ArcSDL has some special considerations when passing a C array to the FORTRAN program.

A C array is by definition a pointer, and as FORTRAN expects arguments to be passed by reference, there should be no problem. However, if the array has multiple dimensions, C assumes row-major order and FORTRAN assumes column-major order; thus, the elements of the array will have to be indexed accordingly.

There are some additional considerations for passing character strings. See
the source code for f772c.c.

Article ID:000002049

Software:
  • ArcMap 8 x
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic