Skip to content

Commit 7f6792b

Browse files
authored
Merge pull request #3487 from HansOlsson/NonEmptyConvertElement
Require that the strings are non-empty.
2 parents 631e3de + e7fccf4 commit 7f6792b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

chapters/annotations.tex

+4-2
Original file line numberDiff line numberDiff line change
@@ -1757,8 +1757,8 @@ \subsubsection{Conversion Rules}\label{conversion-rules}
17571757
Conversions should be applied in all places where named element are used in code, including Modelica URIs (for example, in \lstinline!Documentation! annotations).
17581758
\end{nonnormative}
17591759

1760-
These functions can be called with literal strings or array of strings
1761-
and vectorize according to \cref{scalar-functions-applied-to-array-arguments}.
1760+
These functions can be called with literal strings or arrays of literal strings and vectorize according to \cref{scalar-functions-applied-to-array-arguments}.
1761+
The empty literal string is only allowed when constructing an empty array using \lstinline!fill!.
17621762

17631763
All of these convert-functions only use inheritance among user models, and not in the library that is used for the conversion -- thus conversions of base classes will require multiple conversion calls; this ensures that the conversion is independent of the new library structure.
17641764
The name of the class used as argument to \lstinline!convertElement! and \lstinline!convertModifiers! is similarly the old name of the class, i.e., the name before it is possibly converted by \lstinline!convertClass!.
@@ -1767,6 +1767,8 @@ \subsubsection{Conversion Rules}\label{conversion-rules}
17671767
Specifying conversions using the old name of a class allows the conversion to be done without access to the old
17681768
version of the library (by suitable modifications of the lookup). Another alternative is to use the old version
17691769
of the library during the conversion.
1770+
1771+
The invalid but previously used form \lstinline!convertElement("OldClass", "OldName", "")! should be handled as \lstinline!convertModifiers("OldClass", {"OldName"}, fill("", 0))! without any conversion applied to equations.
17701772
\end{nonnormative}
17711773

17721774
\paragraph*{convertClass("OldClass", "NewClass")}\label{convertclassoldclassnewclass}\annotationindex{convertClass}

0 commit comments

Comments
 (0)