Size Operators

The Size X and Size Y operators allow to access the X and Y (if applicable) size of arrays, matrices, characteristic curves/maps and distributions. These operators work in the same way as the ESDL methods length() (for arrays), xLength() and yLength() (for matrices), getCurrentSize() (for characteristic lines and distributions) and getCurrentSizeX() and getCurrentSizeY() (for characteristic maps).

type

Size X operator

Size Y operator

array

length()

error (MMdl22)

matrix

xLength()

yLength()

characteristic line

getCurrentSize()

error (MMdl22)

characteristic map

getCurrentSizeX()

getCurrentSizeY()

distribution

getCurrentSize()

error (MMdl22)

The inputs of the Size X and Size Y operators can be connected to the Get ports of arrays, matrices, characteristic lines/maps and distributions. If a Size Y operator is connected to an array, distribution or characteristic line, an error (MMdl22) is issued during code generation. An error (MMdl22) is issued also if the input of a Size X or Size Y operator is connected to a scalar or complex diagram element or to the output of an array, matrix, characteristic line or map.

The outputs of the Size X and Size Y operators can be connected to scalar elements of integer or cont type, or to scalar integer or cont inputs of composite and complex elements.

Note

Components that use the Size X and Size Y operators can be exported only in AMD format V6.4.3 and higher. An AMD format V6.4.2 or older will result in an export error.

See also

Example: Size Operators

Using the Size Operators

Get and Set Ports for Arrays and Matrices

Characteristic Lines and Maps

ESDL Editor – Composite Data Types

Introduction – Scalar Types

Introduction – Composite Types

Components as Complex Elements