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 or the declared upper bound of a BAG, LIST or SET. See paragraph 15.10 in ISO 10303-11:1994(E) : The EXPRESS Language Reference Manual.
The model that holds the actual aggregate must be open before this operation can be successfully performed.
Related functions: edmiGetLowerBound , edmiGetLowerIndex , edmiGetUpperIndex
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetUpperBound(SdaiAggr    aggr,
                             SdaiInteger *upperBound); 
Arguments:

aggr

A numeric aggregateID that uniquely identifies the aggregate of interest in the EDMdatabase.
The aggregateID is returned when the aggregate is created or it can be retrieved with an EDMinterface get operation.

upperBound

Address of a SdaiInteger variable that receives the declared upper index if <aggr> is an ARRAY, else the declared upper bound is received.

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
SdaiAggr aggr;
EdmiError rstat;
SdaiInteger upperBound;
. . .
if (rstat = edmiGetUpperBound(aggr, & upperBound)) {
/* Error in operation */ 
printf("\nError: %s in edmiGetUpperBound\n", 
edmiGetErrorText(rstat)); 
goto error; 
}
printf ("\nAggregate: %lu upperBound: %ld", aggr, upperBound);
. . .

  • No labels