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)
NBS The Noticeboard System