ArgCheckItem - Check if an SDS id's details matches the specified details.


Check if an SDS id's details matches the specified details.


A common requirement for the user of the SDS library is to check that a specified SDS item has the right format - type code, number of dimensions and dimensions. This utility function implements such a check.




void ArgCheckItem(id, code, ndims, dims, status)


(">" input, "!" modified, "W" workspace, "<" output)

>idSdsIdTypeIdentifier to the structure to be checked.
>codeSdsCodeTypeThe SDS code we expect. The normal SDS code values or ARG_STRING or -1. If ARG_STRING, we mean a SDS_CHAR with one extra dimension then specified in ndims, which can be of any length. If -1, then ignore the code.
>ndimslongThe expected number of dimensions. 0 to SDS_C_MAXARRAYDIMS (7) or a maximum one less then this if code=ARG_STIRNG. If = -1, then don't check ndims.
>dimslong []The expected dimensions. Only used if ndims>0 or code=ARG_STRING. Only ndims values are used (or ndims+1 if code=ARG_STRING). If the value is negative or zero, the value is ignored, otherwise they must match. Note - long, not the unsigned long that SDS dimension arrays noramlly are. A null pointer can be supplied, which is equivalent of an array of -1 values.
!statusStatusType*Modified status. Possible failure codes are: as per SdsInfo and SDS__INVITEM.


Tony Farrell, {AAO}

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact