FORTRAN 90 Interface

c.m.moreton-smith at rl.ac.uk c.m.moreton-smith at rl.ac.uk
Wed May 6 09:37:59 BST 1998


I had a very interesting request yesterday from one of our instrument
scientists which may have several implications for making the NeXus
FORTRAN-90/5 interface very powerful.

The request was for the ability to insert a complete NeXus structure
directly from a FORTRAN 90 structure.  It had never occurred to me as
I'm used to doing things piece by piece in C++ code but there is a
strong analogy with the old "Get" routines at ISIS where structures were
returned as complete COMMON blocks with mixed types of elements.

Not being a FORTRAN 90 programmer myself, maybe someone can correct me
but if F90 supports RECORDS/STRUCTURES and pointers, surely it would be
possible to define all the _standard_ NeXus blocks in a F90 MODULE for
the F90-NAPI and allow a programmer to populate the record with all the
correct fields in the FORTRAN code and then call one NXputdata?

If the user imported the NeXus definition module, all the structures
would be defined ready for use and programming to the interface for a
users would become incredibly simple?

What do the F90 experts think about this?

	Chris

PS another request that came out of this was for a mechanism to store
LOGICAL variables, this presents something of a problem because I
believe PC FORTRAN uses an int16 for these whilst VMS uses an int32.
Should we define an NXlogical type to make what we are doing clear here?

--
Chris Moreton-Smith, Software Development Manager
ISIS Facility, Rutherford Appleton Lab, Chilton, Didcot, OXON OX11 OQX
Telephone: +44 (0) 1235 446544, Fax: +44 (0) 1235 445720
Email: C.Moreton-Smith at rl.ac.uk





More information about the NeXus-developers mailing list