Fortran 77 Interface
Freddie Akeroyd
faa at isise.rl.ac.uk
Fri Sep 17 10:13:20 BST 1999
Ray, i don't quite understand "requiring the user to be careful about
terminating strings with a "0"; the "putattr" and "getattr" routines all
have a "type" field, so the API could handle the '\0' in those cases. For
"putdata" and "getdata" where there is no "type" field, a call into C
could be added to determine what the "type" of the last "nxopendata" was
and then act accordingly. If the '\0' problem is solvable, would you be
in favour of "equivalance" over "separate routines"?
Freddie
On Thu, 16 Sep 1999, Ray Osborn wrote:
> 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.
> >>
>
>
--
Freddie Akeroyd Email: Freddie.Akeroyd at rl.ac.uk
ISIS Facility Tel: +44 1235 445457
Rutherford Appleton Laboratory Fax: +44 1235 445720
Chilton, DIDCOT, OX11 OQX, GB WWW: http://www.isis.rl.ac.uk/
More information about the NeXus-developers
mailing list