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 users 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 items 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 users buffer.
BYTE_ARRAY = BYTE() (Returned)
Users 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 users 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