-
Notifications
You must be signed in to change notification settings - Fork 43
Closed
Labels
decidedA decision has been made (label added before the spec is changed)A decision has been made (label added before the spec is changed)
Milestone
Description
ModelicaSpecification/chapters/arrays.tex
Lines 220 to 223 in 0f11faa
| The function \lstinline!promote! cannot be used in Modelica, because | |
| the number of dimensions of the returned array cannot be determined at | |
| compile time if \lstinline!n! is a variable. Below, \lstinline!promote! is only used for | |
| constant \lstinline!n!. |
promote is not a builtin function in Modelica is because a variable can have an unknown number of dimensions. Restricting n itself to be constant should not be a problem, right?However, I believe that all such holes in the specification are resolved. If-expressions, etc are required to have the same types in all branches and I cannot seem to construct any expression where the number of dimensions would be unknown.
The minimum change needed would be to remove this rationale, but I believe it is a useful operator to have in the language anyway since MCP 0031 (Flat Modelica) probably needs it anyway. It should be very straight forward to get test implementations of it and into ModelicaSpec 3.5 since all tools probably already use the operator internally.
Metadata
Metadata
Labels
decidedA decision has been made (label added before the spec is changed)A decision has been made (label added before the spec is changed)