No subject

Freddie Akeroyd faa at isise.rl.ac.uk
Thu Apr 30 11:38:01 BST 1998


There is a problem with attribute reading/writing from the FORTRAN
interface at the moment. Due to the different nature of C and FORTRAN
strings, i have to do a conversion as you know. I though i had found a
coding way around the problem of NXgetattr needing to be able to read a
character or a number, but it appears this doesn't always work. The
difficulty comes from some compilers passing the length of a FORTRAN
string as a hidden extra argument, which makes the coding awkward for a
routine that can accept either a string or real - it's "variable
argument list" programing, which FORTRAN 77 certainly isn't set up to
do.  Unless FORTRAN90 provides some help here (can you declare a string
as "pass by C style" in an interface declaration? You can on the PC,
but is that standard?), i can see only two options:

(1) A separate NXgetcharattr() function
(2) Get the user to equivalence the CHARACTER variable to a BYTE
    array before calling NXgetattr() - not legal F77 strictly, but a
    lot of compilers allow it

(1) is certainly easiest to implement, but it means the C and FORTRAN
interfaces are not syntactically identical. How strongly do people
feel about trying to maintaining this?

Freddie

-- 
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