-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public variable in function without input/output #2730
Comments
While not crystal clear, this restriction from 12.2 seems to imply that all of the functions above are illegal:
I'd find it more clear if it was written like this instead:
|
Saw this in test related to #2730.
The implication of the beginning of section 12.4.4 leads me to the same conclusion as Henrik.
|
The following statement in 12.9 also confirms the current intention:
|
I agree that there doesn't seem to be anything special for such parameter/constant in function. |
Function public components must be input or output, check MSL. Agreement. |
This wasn't only a tool issue; had the could actually also have been more clear, see #2730 (comment). Should I prepare a PR? |
I prepared one. |
Dymola check complains about this code:
but not about this:
and also not about this:
Is it allowed to have any variable without input/output in the public section? Why would it be allowed if variability is reduced to constant or parameter? For another discussion about parameters in functions, see #1594.
The text was updated successfully, but these errors were encountered: