- Index
- » Programming
- » Modelica Language
- » Using size operator on variable...
Using size operator on variable arraysize
Using size operator on variable arraysize
Hi,
I just experienced a problem. I defined an array with a variable size:
Real[:, :] TestArray;
Real TestSize;
And later in die equation (or algorithm) part I assigned the value of the array and then tried to read out the size of TestArray:
algorithm
TestArray := {{11,12,13}; {21,22,23}};
TestSize = size(TestArreay, 1);
When I simulated the value of TestSize was 0 all the time. I wasn't using OpenModelica but Wolfram System Modeler. The question that I have is: Is this behaviour normal? Is the size operator only allowed on arrays with a fixed size? In the official Modelica Spec a couldn't find anything...
Thanks!
- Index
- » Programming
- » Modelica Language
- » Using size operator on variable...