Fortran 77 Interface

Freddie Akeroyd faa at isise.rl.ac.uk
Mon Sep 20 09:34:54 BST 1999


We could provide both ways of doing things e.g. a user can call
"nxputattr" and "nxputdata" with character types after doing an
equivalence, or they can call "nxputcharattr" and "nxputchardata" etc. if
they would rather not. If they use f90, they do not need to be concerned
with this as the "function overloading" will match up the correct
function call for them.

Freddie

On Fri, 17 Sep 1999, Ray Osborn wrote:

> Freddie had made the suggestion that we should require the user to 
> equivalence any character string to an integer*1 (or BYTE) array, which
> he/she then uses as the NXputdata/NXgetdata argument etc. I've just checked
> that this works fine on our Alpha/VMS system, even without making any
> arrangements to null-terminate the passed array.  I don't think that this is
> because VMS Fortran initializes all arrays as 0 since I used the same buffer
> more than once, the second time with a shorter string.  The second time, the
> buffer would have been padded with spaces.
> 
> My tentative conclusion is that Freddie is right that null termination is
> not required here because we only pass the array to and from HDF with a
> defined length.  In other words, we don't even have to modify
> NXputdata/NXgetdata to cope with NX_CHAR datatypes.  This would satisfy
> Mark's preference to have the same interface for C and F77 interfaces.
> 
> It does require that the user use EQUIVALENCE statements but this is fairly
> easy to explain.
> 
> Any more opinions?
> 
> 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