HP 3000 Manuals

Conformance [ HP Pascal/iX Reference Manual ] MPE/iX 5.0 Documentation


HP Pascal/iX Reference Manual

Conformance 

A conformable test must be passed to pass an array as an actual
conformant array parameter.  Actual conformant array parameters must have
a type conformable with the conformant array form corresponding to the
parameter in the procedure declaration.

If T1 is an array type with a single index type, and T2 is the type of
the index type specification of a conformant array form, then T1 is
conformable with the conformant array form if all the following are true:

   *   The index type of T1 is type compatible with T2.

   *   You cannot index a value of T1 that does not lie within the bounds
       of that specified by T2.

   *   The component type of T1 is identical to the type identifier of
       the conformant array form, or, if the element type of the
       conformant array form is a conformant array form, is conformable
       with the element type conformant array form in the conformant
       array schema.

   *   Both T1 and the conformant array form are packed or both are
       unpacked.

Syntax 

     Conf_Array_Schema:

[]
Conf_Array:
[]
Example TYPE inxtype = 0..20; ... PROCEDURE Proc1 ( P1: ARRAY[L1..H1:inxtype] OF ARRAY[L2..H2:inxtype] OF integer; P2: PACKED ARRAY[L3..H3:inxtype] OF integer; P3: ARRAY[L4..H4:inxtype] OF integer; P4: ARRAY[L5..H5:inxtype;L6..U6:inxtype] OF integer); ... VAR V1: PACKED ARRAY[0..10] of integer; V2: ARRAY [3..5,1..10] OF integer; V3: ARRAY[1..50] OF integer; V1 is conformable with P2, but not with P1, P3, and P4. V2 is conformable with P1 and P4, but not with P2 or P3. V3 is comformable with P3, but not with P1, P2, or P4.


MPE/iX 5.0 Documentation