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
Modified by dietmarw on 12 Oct 2011 13:41 UTC
In Modelica Standard Library 3.2_build5, Released Dec 13, 2010 there are several syntax errors:
Math/package.mo
Line 2749: Two commas in (LU,,info)
Line 2925: Two commas in (sigma,,V)
Media/Water/IF97_Utilities.mo
Line 3820: .5132047 (should be 0.5132047 a leading number is needed in a real value)
Math/Nonlinear.mo
Functions as input arguments are used as described in the documentation of the file. The syntax specification in Modelica Language Specification, Chapter 12.4.2. should also be added to the syntax definition in Appendix B.
Reported by roland on 12 Oct 2011 13:36 UTC
In Modelica Standard Library 3.2_build5, Released Dec 13, 2010 there are several syntax errors:
Math/package.mo
Line 2749: Two commas in (LU,,info)
Line 2925: Two commas in (sigma,,V)
Media/Water/IF97_Utilities.mo
Line 3820: .5132047 (should be 0.5132047 a leading number is needed in a real value)
Math/Nonlinear.mo
Functions as input arguments are used as described in the documentation of the file. The syntax specification in Modelica Language Specification, Chapter 12.4.2. should also be added to the syntax definition in Appendix B.
Comment by hansolsson on 12 Oct 2011 13:43 UTC
Having two commas is correct Modelica syntax; thus that is not an error in Math/package.mo (it indicates that an output argument between LU and info is ignored by the caller).
The missing leading '0' is an error for the number .5132047
The last part with Math/Nonlinear.mo seems like an issue in the spec that is already being handled.
Comment by stefanv on 12 Oct 2011 13:47 UTC
Regarding numbers with no leading zero, the specification (section 2.4.1) is mildly ambiguous, but the text only says that at least one digit must be present (somewhere). To me, this means that "1." and ".1" are valid numbers, whereas "." by itself is not.
Comment by dietmarw on 12 Oct 2011 14:00 UTC
I was a bit quick here and already opened up #626 for the specification part. Hans feel free to close that one as a duplicate.
The real number thing I fixed in 6becfd1 for maintenance/3.2 and in c29c8b7 for trunk.
Stefan: Since we actually did the number clean up earlier to avoid numbers like .xxx or xxx. in the MSL I simply fix this and close this ticket.
Comment by jmattsson on 12 Oct 2011 14:24 UTC
Replying to [comment:3 stefanv]:
Regarding numbers with no leading zero, the specification (section 2.4.1) is mildly ambiguous, but the text only says that at least one digit must be present (somewhere). To me, this means that "1." and ".1" are valid numbers, whereas "." by itself is not.
I agree, and it would probably be nice to it more explicit in the specification. Most programming languages allows both "1." and ".1" (but not ".").
However, there is a problem with "1.": when combined with ".+", "./", etc, an ambiguity arises.
1. / 2 is "1.0 divided by 2"
1 ./ 2 is "1 element-wise divided by 2" (allowed but same as 1 / 2)
1./ 2 can be interpreted as either of the first two forms
Most scanner generators will generate a scanner that interprets the last form the same as the first form, but the formal grammar allows both interpretations.
Modified by dietmarw on 12 Oct 2011 13:41 UTC
In Modelica Standard Library 3.2_build5, Released Dec 13, 2010 there are several syntax errors:
Math/package.mo
Line 2749: Two commas in
(LU,,info)
Line 2925: Two commas in
(sigma,,V)
Media/Water/IF97_Utilities.mo
Line 3820: .5132047 (should be 0.5132047 a leading number is needed in a real value)
Math/Nonlinear.mo
Functions as input arguments are used as described in the documentation of the file. The syntax specification in Modelica Language Specification, Chapter 12.4.2. should also be added to the syntax definition in Appendix B.
Reported by roland on 12 Oct 2011 13:36 UTC
In Modelica Standard Library 3.2_build5, Released Dec 13, 2010 there are several syntax errors:
Math/package.mo
Line 2749: Two commas in (LU,,info)
Line 2925: Two commas in (sigma,,V)
Media/Water/IF97_Utilities.mo
Line 3820: .5132047 (should be 0.5132047 a leading number is needed in a real value)
Math/Nonlinear.mo
Functions as input arguments are used as described in the documentation of the file. The syntax specification in Modelica Language Specification, Chapter 12.4.2. should also be added to the syntax definition in Appendix B.
Migrated-From: https://trac.modelica.org/Modelica/ticket/625
The text was updated successfully, but these errors were encountered: