Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »


 
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.
The arrayID is returned when the ARRAY is created or it can be retrieved with an EDMinterface get operation.

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);
...

  • No labels