UbiQ Scenario Manager User Manual
72
The optional fields, which appear before the type character, control other
aspects of the formatting, as follows:
type
Required character that determines whether the associated argument is inter-
preted as a character, a string, or a number.
flags
Optional character or characters that control justification of output and printing
of signs, blanks, decimal points, and octal and hexadecimal prefixes. More than
one flag can appear in a format specification.
Character
Type
Output Format
c or C
int or char
Specifies a single-byte character.
d
int
Signed decimal integer.
i
int
Signed decimal integer.
o .
int
Unsigned octal integer
u
int
Unsigned decimal integer.
x
int
Unsigned hexadecimal integer, using “abcdef.”
X
int
Unsigned hexadecimal integer, using “ABCDEF.”
e
double
Signed value having the form [ - ]d.dddd e
[sign]ddd where d is a single decimal digit, dddd is
one or more decimal digits, ddd is exactly three
decimal digits, and sign is + or -.
E
double
Identical to the e format except that E rather than e
introduces the exponent.
f
double
Signed value having the form [ - ]dddd.dddd,
where dddd is one or more decimal digits. The
number of digits before the decimal point depends
on the magnitude of the number, and the number
of digits after the decimal point depends on the
requested precision.
g
double
Signed value printed in f or e format, whichever is
more compact for the given value and precision.
The e format is used only when the exponent of
the value is less than -4 or greater than or equal to
the precision argument. Trailing zeros are trun-
cated, and the decimal point appears only if one or
more digits follow it.
G
double
Identical to the g format, except that E, rather than
e, introduces the exponent (where appropriate).
s or S
String
Specifies a single-byte - character string. Charac-
ters are printed up to the first null character or until
the precision value is reached.
Flag
Meaning
Default
-
Left align the result within the given field width.
Right align.
+
Prefix the output value with a sign (+ or -) if the
output value is of a signed type
Sign appears only
for negative
signed values (-).
0
If width is prefixed with 0, zeros are added until the
minimum width is reached. If 0 and ®C appear,
the 0 is ignored. If 0 is specified with an integer
format (i, u, x, X, o, d) the 0 is ignored.
No padding.
Summary of Contents for UbiQ
Page 1: ...User Manual UbiQ Scenario Manager User Manual V1 03...
Page 4: ...UbiQ Scenario Manager User Manual iv...
Page 7: ...Chapter 1 1 Introduction...
Page 13: ...Chapter 2 2 Getting Started...
Page 37: ...Chapter 3 3 Tutorials...
Page 47: ...Chapter 4 4 Basic of Smart C Script Language...
Page 62: ...UbiQ Scenario Manager User Manual 56...