Skip to content

Commit

Permalink
Deprecate String formatting of Real as Integer
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Dec 27, 2022
1 parent b32949f commit 0512c5d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion chapters/operatorsandexpressions.tex
Expand Up @@ -538,7 +538,8 @@ \subsection{Numeric Functions and Conversion Functions}\label{numeric-functions-
The ANSI-C style \lstinline!format! string (which cannot be combined with any of the other named arguments) consists of a single conversion specification without the leading \%.
It shall not contain a length modifier, and shall not use `\lstinline!*!' for width and/or precision.
For both \lstinline!Real! and \lstinline!Integer! values, the conversion specifiers `\lstinline!f!', `\lstinline!e!', `\lstinline!E!', `\lstinline!g!', `\lstinline!G!' are allowed.
For \lstinline!Integer! values it is also allowed to use the `\lstinline!d!', `\lstinline!i!', `\lstinline!o!', `\lstinline!x!', `\lstinline!X!', `\lstinline!u!', and `\lstinline!c!' conversion specifiers (for \lstinline!Real! values a tool may round, truncate or use a different format if the integer conversion specifiers are used).
For \lstinline!Integer! values it is also allowed to use the `\lstinline!d!', `\lstinline!i!', `\lstinline!o!', `\lstinline!x!', `\lstinline!X!', `\lstinline!u!', and `\lstinline!c!' conversion specifiers.
Using the \lstinline!Integer! conversion specifiers for a \lstinline!Real! value is a deprecated feature without defined result.

The `\lstinline!x!'/`\lstinline!X!' formats (hexa-decimal) and \lstinline!c! (character) for \lstinline!Integer! values give results that do not agree with the Modelica grammar.

Expand Down

0 comments on commit 0512c5d

Please sign in to comment.