Compatibility Check for Arrays and Matrices

Note

This topic does not apply to arrays/matrices used as messages.

The compatibility of two arrays or matrices is checked on the following occasions:

An array/matrix element can be assigned to an array/matrix reference if the following criteria are met:

  1. both arrays/matrices have the same base type (cont, limitInt, wrapInt, sdisc, udisc, log, enumeration, record)

    AND

  2. both arrays/matrices have the same number of dimensions

    AND

  3. the element implementation type is identical (value range, formula, limitation)

    AND

  4. the respective dimensions are compatible in the following sense:

    • an array/matrix with fixed max. size can be assigned to an array/matrix reference with identical fixed max. size

      OR

    • both arrays/matrices are of variant size determined by identical system constants

      OR

    • an array/matrix with fixed max. size can be assigned to an array/matrix reference with variant max. size (the equality of the sizes is checked during code generation or compilation)

      OR

    • an array/matrix with variant max. size can be assigned to an array/matrix reference with fixed or variant max. size (the equality of the sizes is checked during code generation or compilation)

      OR

    • an array/matrix with fixed, variant or variable max. size can be assigned to an array/matrix reference with variable max. size

    AND – for arrays/matrices of enumeration or record types -

  5. both array/matrices use identical enumerations or records

Note

Different from ASCET V6.2, an array/matrix with fixed max. size cannot be assigned to an array/matrix reference with larger fixed max. size. Code generation for existing models that use such assignments will fail.

It is recommended that you convert the array/matrix references in these models to arrays/matrices with variable size, either manually or for the entire database.

See also

Array

Matrix

Variant Size for Arrays and Matrices

Variable Size for Arrays and Matrices