ChebyshevI initializes array in a weird way #797
Labels
enhancement
New feature or enhancement
L: Blocks
Issue addresses Modelica.Blocks
P: lowest
Lowest priority issue
Milestone
Reported by sjoelund.se on 29 Aug 2012 11:13 UTC
Modelica.Blocks.Continuous.Internal.Filter.base.ChebyshevI has the variable den1, which through some magic gets dimension sizes 0 or 1 and is allocated fine.
It then checks dimension size 0 and if it is, skips initializing the array, in itself fine. But there is one branch that looks like it never gets initialized, and the array is then used.
To make analysis of the function easier, both for human and machine, fill() is better used before the if-statement, i.e.
Maybe then I would not spend 10 minutes trying to figure out why the code actually works...
I also like
more than
Migrated-From: https://trac.modelica.org/Modelica/ticket/797
The text was updated successfully, but these errors were encountered: