-
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
Implicit iterator range and expandable arrays. #2560
Comments
I agree that there is currently nothing forbidding it, but I believe it should be: Specifically having an implicit iterator range based on an array in an expandable connector. Note that implicit iterator ranges require that all indexed arrays have the same size, i.e. we cannot say that x determines the size and ec.ro just tags along. The Boolean indexing of ec.ro seems odd, but I don't see any particular reason to forbid it. |
This is exactly what we do, and it works. we just disallow loops where the only usage of the iterator is as a subscript of a member of an expandable connector. |
Ok, that would be possible but it feels odd to me, and that's not part of the spec:
|
Rewriting:
or:
I thus see two possibilities:
Go for 2nd option. Gerd, Christoff, Dag, Hans abstain |
Implements the part of the decision in modelica#2560 that wasn't included in modelica#2589.
No deduction of iterator range from array in bus Closes #2560
Implements the part of the decision in #2560 that wasn't included in #2589. * Restrict use of 'size' on components of expandable connectors * Tidy up function calls that are parameter expressions; * Improve readability of source of nested item list on expandable connectors; Stumbled upon these when looking for specification of 'size'. * Also throwing in some missing \lstinline. * Say 'Error', not 'Not allowed' in listing comments * Restrict uses of sizeless array components of expandable connectors
I was wondering if the following model is valid:
I couldn't find anything forbidding it, so I suppose it is.
The text was updated successfully, but these errors were encountered: