#2663 closed defect (invalid)
Subscripting modifiers is not allowed.
Reported by: | Owned by: | somebody | |
---|---|---|---|
Priority: | high | Milestone: | 1.9.1 |
Component: | Frontend | Version: | trunk |
Keywords: | Cc: | matthias.pfafferodt@… |
Description
I got the error 'Subscripting modifiers is not allowed. Apply the modification on the whole identifier using an array-expression or an each-modifier.
'. Example and debug output attached.
#> omc +showErrorMessages +d=failtrace OM_Bug_01.mo > trace.txt 2>&1
Run with OpenModelica version OpenModelica-1.9.1.svn.19989
The test case runs fine with Dymola.
Attachments (2)
Change History (6)
by , 11 years ago
Attachment: | OM_Bug_01.mo added |
---|
comment:1 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
You model has:
record test = OM_Bug_01.Data (i=1, Enum[:]={Modelica.Blocks.Types.AnalogFilter.Bessel, Modelica.Blocks.Types.AnalogFilter.Bessel});
From the grammar of Modelica in Modelica specification 3.2 revision 2:
https://modelica.org/documents/ModelicaSpec32Revision2.pdf
element_modification : name [ modification ] string_comment name : [ "." ] IDENT { "." IDENT } modification : class_modification [ "=" expression ] | "=" expression | ":=" expression class_modification : "(" [ argument_list ] ")"
The grammar *DOES NOT ALLOW* for array dimensions in the modifer name!
If Dymola supports it, that doesn't mean is conform to the specification.
comment:2 by , 11 years ago
Thanks for the comment! I did not know that this is not allowed ...
Could you give me a hint how to change the value of the variable 'Enum' in that case?
example for the bug