next up previous 372
Next: Portability to UNIX
Up: General Description
Previous: Saving to Disc

C-callable Version

The NBS routines have been implemented to make them easy to use from Fortran, and for this reason all character strings are passed as standard Fortran character arguments (address of VMS descriptor on VMS, character pointer with trailing hidden length argument on most other architectures) and all other parameters are passed by reference.

The routines are actually written in C and it would be unreasonable and wasteful to force C programmers to build descriptors just so that they could be decoded back to the same C strings that they started off as. For this reason, every NBS routine (except a few which handle character strings) has an associated NBC routine which passes all character parameters as C zero-terminated strings, all input scalar parameters by value and all other parameters by reference. See the source of the demonstration programs described in Appendix C for examples of the use of this C-callable version.



next up previous 372
Next: Portability to UNIX
Up: General Description
Previous: Saving to Disc

NBS The Noticeboard System
Starlink User Note 77
D.J. Allan
11 September 1995
E-mail:ussc@star.rl.ac.uk