OSF DCE Application Development Guide--Core Components

OSF DCE Application Development Guide—Core Components
/* Assume the following values for the referenced variables:
n3=5;
x2 = 12;
x3 = 14;
z2=9;
z3 = 10;
*/
/* The following declaration */
int [min_is(,,n3),max_is(,x2,x3)] hh[3..13,4..*,*..*];
/* specifies the same data to be */
/* transmitted as the declaration */
int [min_is(,,n3),size_is(,z2,z3)] hh[3..13,4..*,*..*];
17.14.5.3.4 The last_is Attribute
The last_is attribute is one of the attributes that can be used to allow the amount of data
in an array that will be transmitted to be determined at runtime. Each last_is attribute
specifies an upper data limit, which is the highest index value in that dimension for the
array elements to be transmitted. If the entry in a last_is attribute for a dimension is
empty, the effect is as if the upper bound in that dimension had been specified.
An array can have either the last_is attribute or the length_is attribute, but not both.
When an array with the last_is attribute is used in a remote procedure call, the elements
actually passed in the call can be a subset of the maximum possible.
The last_is attribute is for use with varying arrays. The following is an example of the
last_is attribute:
/* Assume the following values for the referenced variables:
longa=1;
longb=2;
longc=3;
long e = 25;
long f = 35;
*/
long [last_is(a,b)] bb1[10][20]; /* transmit bb1[0..1][0..2] */
long [last_is(a,b)] bb2[-1..10][-2..20][-3..30];
/* transmit bb2[-1..1][-2..2][-3..30] */
long [last_is(a,,c)] bb3[-1..10][-2..20][-3..30];
/* transmit bb3[-1..1][-2..20][-3..3] */
long [last_is(,b,c),max_is(,e)] cc1[10][][30];
/* transmit cc1[0..9][0..2][0..3] */
long [last_is(a,b),max_is(,e,f)] cc2[-4..4][][];
/* transmit cc2[-4..1][0..2][0..35] */
17 38 Tandem Computers Incorporated 124245