L-VIS User Manual
297
LOYTEC
Version 6.2
LOYTEC electronics GmbH
15.7.1.4 Length Modifier
The conversion specifier may normally be preceded by a length modifier, defining the
physical size of the arguments data type. In the L-VIS implementation, this modifier is not
necessary and may be omitted in all cases.
15.7.1.5 Conversion Specifier
This is the character that specifies the type of conversion to be applied. The available
conversion specifiers and their meanings are:
d
,
I
The
int
argument is converted to signed decimal notation. The precision, if any,
gives the minimum number of digits that must appear; if the converted value
requires fewer digits, it is padded on the left with zeros. The default precision is 1.
When 0 is printed with an explicit precision 0, the output is empty.
o
,
u
,
x
,
X
The
unsigned int
argument is converted to unsigned octal (
o
), unsigned decimal
(
u
), or unsigned hexadecimal (
x
and
X
) notation. The letters
abcdef
are used for
x
conversions; the letters
ABCDEF
are used for
X
conversions. The precision, if
any, gives the minimum number of digits that must appear; if the converted value
requires fewer digits, it is padded on the left with zeros. The default precision is 1.
When 0 is printed with an explicit precision 0, the output is empty.
e
,
E
The
double
argument is rounded and converted in the style [−]d
.
ddd
e
±dd where
there is one digit before the decimal point character and the number of digits after
it is equal to the precision; if the precision is missing, it is taken as 6; if the
precision is zero, no decimal point character appears. An
E
conversion uses the
letter
E
(rather than
e
) to introduce the exponent. The exponent always contains at
least two digits; if the value is zero, the exponent is 00.
f
,
F
The
double
argument is rounded and converted to decimal notation in the style
[−]ddd
.
ddd, where the number of digits after the decimal point character is equal to
the precision specification. If the precision is missing, it is taken as 6; if the
precision is explicitly zero, no decimal point character appears. If a decimal point
appears, at least one digit appears before it.
g
,
G
The
double
argument is converted in style
f
or
e
(or
F
or
E
for
G
conversions).
The precision specifies the number of significant digits. If the precision is missing,
6 digits are given; if the precision is zero, it is treated as 1. Style
e
is used if the
exponent from its conversion is less than −4 or greater than or equal to the
precision. Trailing zeros are removed from the fractional part of the result; a
decimal point appears only if it is followed by at least one digit.
s
The argument is expected to be a text string. If a precision is specified, no more
characters than the number specified are written.
%
A ‘%’ is written. No argument is converted in the process.
15.7.2 Date format strings
The format string used by non-localized date controls is equivalent to the format string used
by the ANSI-C function strftime. The locale setting for the purpose of formatting dates is
fixed to U.S., therefore the names of weekdays and months will be in English language
only. Enable localized formatting (if available), to show localized dates.
Conversion specifiers are introduced by a ‘%’ character, and are replaced as follows:
%a
The abbreviated weekday name.
%A
The full weekday name.