SdsResize - Change the dimensions of an array.

Function

Change the dimensions of an array.

Description

Change the number and/or size of the dimensions of an array. This operation can be performed on primitive arrays or structure arrays. Note that SDS_RESIZE does not move the data elements in the storage representing the array, so there is no guarantee that after resizing the array the same data will be found at the same array index positions as before resizing, though this will be the case for simple changes such as a change in the last dimension only.

If the size of a primitive array is increased the contents of the extra locations is undefined. Decreasing the size causes the data beyond the new limit to be lost.

If a structure array is extended the new elements created will be empty structures. If a structure array is decreased in size, the lost elements and all their components will be deleted.

Language

C

Declaration

void SdsResize(SdsIdType id, long ndims, unsigned long *dims, StatusType * SDSCONST status)

Parameters

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

>idSdsIdTypeIdentifier of the object to be resized.
>ndimslongNew number of dimensions.
>dimsunsigned long*Array of dimensions.
!statusStatusType*Modified status. Possible failure codes are:

SDS__BADID The identifier is invalid.
SDS__NOMEM Insuficient memory.
SDS__EXTERN Object is external.
SDS__NOTARR Object is not an array.
SDS__INVDIMS Dimensions invalid.

Support

Jeremy Bailey, {AAO}

Version date

23-Oct-91

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

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