next up previous 372
Next: Finding out about Items
Up: Examples of Using the NBS Routines
Previous: Putting Values into the Noticeboard

Getting values from the Noticeboard

Values can be accessed either by copying to and from the user's buffer or else directly to and from the noticeboard. Both methods are illustrated here.

      INTEGER   ACTBYTES                ! Actual number of bytes stored
      INTEGER   POINTER                 ! Pointer to MATRIX data
      CHARACTER*20  CONF                ! Configuration to be read

Get current value of MATRIX. We expect the actual number of bytes to be at least 16.

      NBS_GET_VALUE (MATID,0,16,MATRIX,ACTBYTES,STATUS)
      IF (ACTBYTES .LT. 16) THEN
         panic
      ENDIF

Again, reading character strings is slightly different,

      NBS_GET_CVALUE (MATID,0,CONF,     ! Use the portable routine
                     ACTBYTES,STATUS)
      NBS_GET_VALUE (MATID,0,LEN(CONF), ! or the VMS specific call
 %REF(CONFIG),ACTBYTES,STATUS) ! using %REF

Alternatively get a pointer to the actual data in the noticeboard.

      NBS_GET_POINTER (MATID,POINTER,STATUS)
      MATRIX_OP(%VAL(POINTER),STATUS)



next up previous 372
Next: Finding out about Items
Up: Examples of Using the NBS Routines
Previous: Putting Values into the Noticeboard

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