You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported by per.ostlund on 7 Mar 2013 11:38 UTC
If I understand the grammar correctly, it seems like it requires annotations in class definitions to be the last part of the composition. This seems to be followed by the MSL. Some of the examples in chapter 18 seems to imply otherwise though, such as the World example in 18.7 where the annotation is the first part of the composition. The tools that I've tried also allow class annotations to be placed anywhere inside a class. So either the grammar should be changed to allow this, or the examples in the specification needs to be fixed.
Comment by per.ostlund on 7 Mar 2013 12:58 UTC
Ok, I see now that this is mentioned in the revision history. Besides the one in 18.7 I've also found such examples in 18.8.2 and 18.8.4, where ellipses are used to imply more content after the annotation.
Comment by stefanv on 7 Mar 2013 14:12 UTC
Many tools allow it to appear anywhere (or even in more than one location) because this was historically allowed (up to Modelica 2.2 if I remember correctly). Any examples that still follow this usage should be updated.
Comment by hansolsson on 31 Mar 2016 09:42 UTC
Updated examples to place annotations last (to not be misleading).
Some were already corrected as part of #1544 - but the rest should be done in r9238.
Reported by per.ostlund on 7 Mar 2013 11:38 UTC
If I understand the grammar correctly, it seems like it requires annotations in class definitions to be the last part of the composition. This seems to be followed by the MSL. Some of the examples in chapter 18 seems to imply otherwise though, such as the World example in 18.7 where the annotation is the first part of the composition. The tools that I've tried also allow class annotations to be placed anywhere inside a class. So either the grammar should be changed to allow this, or the examples in the specification needs to be fixed.
Migrated-From: https://trac.modelica.org/Modelica/ticket/1009
The text was updated successfully, but these errors were encountered: