Skip to content

Commit

Permalink
Clean up presentation of 'format'
Browse files Browse the repository at this point in the history
  • Loading branch information
henrikt-ma committed Oct 18, 2022
1 parent b27a186 commit 9a32ce0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions chapters/operatorsandexpressions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -534,10 +534,9 @@ \subsection{Numeric Functions and Conversion Functions}\label{numeric-functions-
\lstinline!(if leftJustified then "-" else "") + String(minimumLength) + "d"!
\end{itemize}

Form of the ANSI-C style \lstinline!format! string:
The string specifies one conversion specifier (excluding the leading \%), shall not contain length modifiers, and shall not use `\lstinline!*!' for width and/or precision.
For all numeric values the format specifiers `\lstinline!f!', `\lstinline!e!', `\lstinline!E!', `\lstinline!g!', `\lstinline!G!' are allowed.
For integral values it is also allowed to use the `\lstinline!d!', `\lstinline!i!', `\lstinline!o!', `\lstinline!x!', `\lstinline!X!', `\lstinline!u!', and `\lstinline!c!' format specifiers (for non-integral values a tool may round, truncate or use a different format if the integer conversion characters are used).
The ANSI-C style \lstinline!format! string (which cannot be combined with any of the other named arguments) consists of a single conversion specifier without the leading \%, shall not contain length modifiers, and shall not use `\lstinline!*!' for width and/or precision.
For all numeric values the type field specifiers `\lstinline!f!', `\lstinline!e!', `\lstinline!E!', `\lstinline!g!', `\lstinline!G!' are allowed.
For integral values it is also allowed to use the `\lstinline!d!', `\lstinline!i!', `\lstinline!o!', `\lstinline!x!', `\lstinline!X!', `\lstinline!u!', and `\lstinline!c!' type field specifiers (for non-integral values a tool may round, truncate or use a different format if the integer conversion characters are used).

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.
\end{semantics}
Expand Down

0 comments on commit 9a32ce0

Please sign in to comment.