Fortran 77 Interface

Freddie Akeroyd faa at isise.rl.ac.uk
Thu Sep 16 15:45:29 BST 1999


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.
> 
> The problem is that, as you probably know, Fortran passes character strings
> by descriptor rather than reference, so that it is impossible to have a
> single routine that accepts either numeric or character data in the same
> argument.  Fortran 90 can cope with this by allowing multiple generic
> routines that are invoked according to the type of argument in the calling
> program.  Fortran 77 doesn't have this facility.
> 
> Unfortunately, the only way around this, I believe, is to have separate
> NXputattr and NXputcharattr routines (and NXgetattr etc).  I now realize
> that this applies to NXputdata and NXgetdata as well, since character string
> SDS's are allowed in the standard.  This makes the F77 API different from
> the others, but I can't see a more elegant or portable way.  I think that
> Freddie came to the same conclusions last year.
> 
> I can make the necessary changes but I wanted to check if anyone has any
> objections first, before I commit the files to the CVS server.  We will then
> have to make the announcement to the NeXus mailing list.
> 
> Please reply by Monday if possible, because I want to get this out of the
> way so that we can release a (bug-free?) v 1.1.1.  I've also not heard any
> response to my last message concerning the HDF Browser.  Has anyone seen
> linked data items properly displayed in it?  I would like to send Fortner a
> bug report.
> 
> Regards,
> 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
> 
>  
> 

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