Returns the declared upper index of an ARRAY. See paragraph 15.11 in ISO 10303-11:1994(E) : The EXPRESS Language Reference Manual.
The model that holds the actual ARRAY must be open before this operation can be successfully performed.
Related functions: edmiGetLowerIndex , edmiGetLowerBound , edmiGetUpperBound , and edmiGetAggrDomain
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetUpperIndex(SdaiArray array,
SdaiInteger *upperIndex);
Arguments:
array |
A numeric arrayID that uniquely identifies the ARRAY aggregate instance of interest in the EDMdatabase. |
upperIndex |
Address of an SdaiInteger variable that receives the declared upper index of the specified <array> |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
SdaiArray array;
EdmiError rstat;
SdaiInteger upperIndex;
. . .
if (rstat = edmiGetUpperIndex (array, &upperIndex)) {
/* Error in operation */
printf("\nError: %s in edmiGetUpperIndex \n",
edmiGetErrorText(rstat));
goto error;
}
printf ("\nArray: %lu upperIndex: %ld", array, upperIndex);
...