- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » "Array dimensions must be known at...
"Array dimensions must be known at compile time"
"Array dimensions must be known at compile time"
A frequent problem during OpenModelica compiling/simulations: "Array dimensions must be known at compile time".
How to resolve this problem?
In Dymola there isn't those problems. Why?
- claudio34
- 88 Posts
Re: "Array dimensions must be known at compile time"
That's because the Modelica specification did not say which parameter expressions are valid as array dimensions (and not all of them are allowed). Use constant expressions instead of parameter expressions if you want less problems.
- sjoelund.se
- 1700 Posts
Re: "Array dimensions must be known at compile time"
thank you so much, but can i resolve with initial conditions? for example for arrary A[m] (start m=3) ?
- claudio34
- 88 Posts
Re: "Array dimensions must be known at compile time"
If m is a constant, you can use it to declare an array of size m. Start-values has nothing to do with this. A can be modified in any way you like as long as m is a constant expression (and in some cases parameter expression).
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » "Array dimensions must be known at...