Fortran 77 Interface

Ray Osborn ROsborn at anl.gov
Thu Sep 16 17:00:32 BST 1999


The equivalence method looks quite attractive, and I've confirmed that it 
works.  Equivalence is a deprecated feature in Fortran now, but then if you
worry about that, you should be writing in Fortran 90.  The main drawback is
requiring the user to be careful about terminating strings with a 0, since
the API won't know that it needs doing.   This would have to be done either
by concatenating CHAR(0) to the string, or assigning 0 to the next element
in the BYTE array.  Either way requires more work.  I think it's probably
safer to tell the F77 programmer to use different routines for character
data.

Ray
--
Dr Ray Osborn                Tel: +1 (630) 252-9011
Materials Science Division   Fax: +1 (630) 252-7777
Argonne National Laboratory  E-mail: ROsborn at anl.gov
Argonne, IL 60439-4845



> The only alternative i could think of was to require the user
> to equivalence any character strings to "INTEGER*1" or
> "BYTE" data type and then pass these to the routines instead. There are
> probably also system dependent ways of doing it e.g. by specifying a "C"
> style calling convention for FORTRAN functions, but it may not be possible
> to cover all possible operating systems this way
>
> Freddie
>
> On Thu, 16 Sep 1999, Ray Osborn wrote:
>
>> I've been trying to develop a more comprehensive test program to make sure
>> that the different language interfaces give consistent input/output,
>> particularly with regard to slabs of multi-dimensional datasets.  I've now
>> got around to the Fortran 77 interface which appears to have a number of
>> serious problems.  Freddie drew attention to this a year ago, but I'm afraid
>> that I was occupied with other matters and have only just realized how
>> serious they are.
>>




More information about the NeXus-developers mailing list