(j3.2006) (SC22WG5.3585) OPTIONAL arguments and C interop

Van Snyder Van.Snyder
Wed Jul 16 14:36:36 EDT 2008

On Wed, 2008-07-16 at 11:22 -0700, Aleksandar Donev wrote:
> For OPTIONAL, I don't see how one can use a function or a struct to
> get around the fact that some vendor passes 2 arguments instead of 1.
> So even if we use some opaque way to specify what is present and what
> is not (instead of saying NULL is not present and all else is
> present), we still have to decide the number of arguments and their
> matching between Fortran interfaces and C prototypes.

I did actually read that in Bill's message, but hadn't appreciated it.

Do any vendors use separate arguments to pass shape for assumed-shape

I know some use a separate argument for the length for characters.  Do
they use three arguments for optional characters?

It seems bizarre that they would use a structure for one case, and
multiple arguments for another, but there it is.

Van Snyder                    |  What fraction of Americans believe 
Van.Snyder at jpl.nasa.gov       |  Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or
disapproved by JPL, CalTech, NASA, the President, or anybody else.

More information about the J3 mailing list