Convert a scalar Real, Integer or Boolean expression to a String representation
String(b_expr, minimumLength=0, leftJustified=true) String(i_expr, minimumLength=0, leftJustified=true) String(r_expr, significantDigits=6, minimumLength=0, leftJustified=true) String(r_expr, format) String(e_expr, minimumLength=0, leftJustified=true)
The arguments have the following meaning (the default values of the optional arguments are shown in the left column):
Boolean b_expr | Boolean expression | ||||||||
Integer i_expr | Integer expression | ||||||||
Real r_expr | Real expression | ||||||||
type e_expr = enumeration(..) | Enumeration expression | ||||||||
Integer minimumLength = 0 | Minimum length of the resulting string. If necessary, the blank character is used to fill up unused space. |
||||||||
Boolean leftJustified = true | if true, the converted result is left
justified; if false, it is right justified in the string. |
||||||||
Integer significantDigits = 6 | defines the number of significant digits in the result
string (e.g., "12.3456", "0.0123456", "12345600", "1.23456E-10") |
||||||||
String format | defines the string formatting according to ANSI-C without "%"
and "*" character (e.g., ".6g", "14.5e", "+6f"). In particular: format = "[<flags>] [<width>] [.<precision>] <conversion>" with
|
String(2.0) // = "2.0" String(true) // = "true" String(123, minimumLength=6, leftJustified=false) // = " 123"