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
Heterogeneous arrays with non-record classes #3414
Comments
That example should be legal. The record part is that it would also be legal if A were a record. Note that the introductions to the chapters are non-normative, so it is better to view this as an explanation than as a restriction. As an explanation it is a bit odd: it would be highly relevant if we had the possibility to introduce heterogenous redeclarations for arrays (and then there should be something normative), but that is not legal at the moment. Similarly the array of array part is redundant with the rectangular case. However, the omitted ... part is relevant as it indicates how arrays with different sizes can be used (10.6.9 Slice Operation - added: or rather component reference in 3.2). And even if we don't have heterogenous redeclarations there is also the possibility of conditional components in A - e.g. someone added |
Thank you for the clarification. I was mainly confused why emphasis was put on the array of records when a heterogenous array can arise from other sources as well (like differently parameterised array size or conditional components). The current wording gave me the impression that records are the only source of heterogenous arrays. |
The standard states at the start of ch. 10 (emphasis mine)
What is the meaning of record in this case? Does it refer only to
record
type classes, or does it mean any composite, such asmodel
,block
or genericclass
? The tools I have tried seem to take the latter approach, e.g. OpenModelica accepts the following:If this is indeed the intention, it might be helpful to clarify this paragraph.
The text was updated successfully, but these errors were encountered: