.ModelicaReference.Operators.'size()'

Information

Returns dimensions of an array

Syntax

   size(A,i)
   size(A)

Description

The first form returns the size of dimension i of array expression A where i shall be > 0 and ≤ ndims(A).

The second form returns a vector of length ndims(A) containing the dimension sizes of A.

Examples

Real A[8,4,5];
Integer n3   = size(A,3);  // = 5
Integer n[:] = size(A);    // = {8,4,5}

Generated at 2024-12-21T19:25:56Z by OpenModelicaOpenModelica 1.24.3 using GenerateDoc.mos