sdaiTestAggrByIndex


Returns sdaiTRUE when the specified ARRAY element has an assigned value, else sdaiFALSE is returned. This operation is applicable for ARRAY aggregates only. The legal index range for ARRAY is as found in the actual ARRAY declaration in the related EXPRESS schema.
An ARRAY element can be assigned a value by either the sdaiPutAggrByIndex or the sdaiPutAggrByIterator operations. An assigned ARRAY element value can be removed, i.e. unset by one the operations sdaiUnsetAggrByIndex or sdaiUnsetAggrByIterator .
This operation is only applicable for ARRAY aggregates.
The model that holds the actual aggregate must be open before this function can be successfully performed.
Related functions: edmiTestAggrByIterator , sdaiPutAggrByIndex , sdaiPutAggrByIterator , sdaiUnsetAggrByIndex , sdaiUnsetAggrByIterator
Header:
#include "sdai.h"
Prototype:
SdaiBoolean sdaiTestAggrByIndex(SdaiArray   array,
                                 SdaiInteger index); 
Arguments:

array

A numeric arrayID that uniquely identifies the ARRAY aggregate instance of interest in the EDMdatabase.
The arrayID is returned when the aggregate is created or it can be retrieved by an _EDMinterface_ get operation.

index

An integer that denotes the aggregate element index in the ARRAY aggregate instance specified by the <array> argument.
The legal index range is as found in the related ARRAY declaration in the related EXPRESS schema.

Returns:
A SdaiBoolean value that has the following value:
sdaiTRUE : The actual ARRAY element has an assigned value.
sdaiFALSE : The actual ARRAY element value is indeterminate, i.e. the element value is unset (non existing). Use sdaiErrorQuery to check for error in operation.
Examples:
SdaiArray array;
SdaiErrorCode errCode;
...
if (sdaiTestAggrByIndex(array, 5) == sdaiTRUE) {
/* Array element is set */ 
} else {
if (errCode = sdaiErrorQuery()) { 
/* Error in operation */ 
printf("\nError: %s in sdaiTestAggrByIndex \n", 
edmiGetErrorText(errCode)); 
goto error; 

}
. . .