next up previous 372
Next: NBS_GET_MODIFIED - Get the noticeboard modified count or an item modified count depending on whether this is a structured or
Up: Description of Individual NBS Routines
Previous: NBS_GET_CVALUE - Get a character string from a slice of a primitive item associated with the specified identifier


NBS_GET_SHAPE - Get the shape of a primitive item associated with the specified identifier

Description:

      Check that the ID is not NIL and that it pertains to a primitive item. 

Repeat
{
Read the modified count for this item.
Copy as many dimensions as there is room for in the user's buffer from the noticeboard and
return the actual number of dimensions in the item.
Read the modified count for this item once more.
}
Until time out or the two modified counts are equal and even
(which means that the values were not updated whilst they were being read).

If CHECK_MODIFY is FALSE, the item's modified count is not checked at all and a timeout cannot occur.

Note also that the MAXDIMS parameter to this routine is a MODIFIED parameter.


Invocation:
(Int) = NBS_GET_SHAPE (ID,MAXDIMS,DIMS,ACTDIMS,STATUS)

Arguments:

ID = INTEGER (Given)
Identifier of the item from which the shape is to be got.
MAXDIMS = INTEGER (Given and returned)
On entry, size of the DIMS array. On exit the maximum number of dimensions that this item can have.
DIMS = INTEGER(*) (Returned)
Returned dimensions.
ACTDIMS = INTEGER (Returned)
Actual number of dimensions associated with the item. This may be greater than MAXDIMS but no more than MAXDIMS values will be copied into the DIMS array.
MAXBYTES = INTEGER (Given)
Size in bytes of the user's buffer.
BYTE_ARRAY = BYTE(*) (Returned)
User's buffer into which bytes will be got.
ACTBYTES = INTEGER (Returned)
Actual number of values associated with the item. This may be greater than OFFSET + MAXBYTES but no more than MAXBYTES bytes will be copied into the user's buffer.
STATUS = INTEGER (Given and returned)
The global status. Possible return values are,

NBS__NILID   		 NIL ID 

NBS__NOTPRIMITIVE Item is not primitive
NBS__TIMEOUT Timeout awaiting valid data



next up previous 372
Next: NBS_GET_MODIFIED - Get the noticeboard modified count or an item modified count depending on whether this is a structured or
Up: Description of Individual NBS Routines
Previous: NBS_GET_CVALUE - Get a character string from a slice of a primitive item associated with the specified identifier

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