- Index
- » Developer
- » OpenModelica development
- » omc allows annotation before...
omc allows annotation before element_list
omc allows annotation before element_list
Dear developers,
I have the following modelica program:
model M annotation (); Real v; end M;
Which produces:
$ omc M.mo
class M
Real v;
end M;
However, according to the Modelica specivication 3.3, Appendix B.2, an annotation is never legal before an element_list.
Am I missing something or is this a bug of omc?
Sincerly yours,
Heinrich Hördegen
Re: omc allows annotation before element_list
It used to be allowed, so OpenModelica automatically moves it to the end of the class:
Code:
[martin@mega tmp]$ omc +d=showStatement a.mos
Evaluating: loadString("model M annotation (); Real v; end M;")
true
Evaluating: list()
"model M
Real v;
annotation;
end M;
"
- sjoelund.se
- 1700 Posts
Re: omc allows annotation before element_list
Also, you can use the +showAnnotations flag to have omc print out the annotations in the flat code, the default is to not print them.
- perost
- 114 Posts
- Index
- » Developer
- » OpenModelica development
- » omc allows annotation before...