ArgPut1DArrayS - Put a 1D string array.

Function

Put a 1D string array.

Description

Put an a string array item into an ARG structure. The item is created if it does not exist.

Does not convert items like the other Arg routines - if the item already exists it must be at least as long as required and of the same type and the size of each string must be the same.

Note - we actually created a 2D SDS array of char to represent this array of 1D strings. This is a convience feature.

Language

C

Declaration

void ArgPut1DArrayS(id, name, strlen, dim, data, status)

Parameters

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

>idSdsIdTypeIdentifier to the structure.
>namechar*Name of the component to be written to.
>slenunsigned longLength of each string item. If the array does not already exist, it will be created with this number of characters in each string. If it does exist, it must have at least this number. This should include the null terminated.
>dimunsigned longNumber of elements in array. If array does not already exist, it will be created with this number of elements. If it does exist, it must have at least this number of elements
>data*char[]The data to be inserted. Array of dim pointers to null terminated strings. If the length of any of these including their null terminator are longer then slen, then an error is triggered.
!statusStatusType*Modified status. Possible failure codes are:

SDS__NOMEM Insufficient memory for creation
SDS__BADID Invalid Identifier
SDS__INVDIMS Item exists but it not a 1 D array or is 1 D but has less then "dim" elements.
SDS__INVTYPE Item exists but it not of type SDS_DOUBLE.
ARG__CNVERR The length of an item in "data" plus the null terminator is longer then slen
ARG__NOTSTRING One of the values within data[] is null.

Support

Tony Farrell, {AAO}

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

 For more information, contact tony.farrell@mq.edu.au