
3. CREATING A C PROGRAM
B–61863E–1/06
APPLICATION
PROGRAMMING GUIDE
402
(1) When a “–” is specified, the converted character string is output
left–justified.
If not specified, the character string is output right–justified.
(2) Specifies the number of digits to output. At least the number of digits
specified is output. If not specified, all of the digits in the converted
character string are output.
(3) Specifies the maximum number of digits in a converted character
string to be output.
If not specified, all of the digits in the converted character string are
output.
(4) When “l” is specified, the number is a long–type.
If not specified, the number is a short–type.
“d” : Convert and output as a signed decimal.
“o” : Convert and output as an unsigned octal.
“x” : Convert and output as an unsigned hexadecimal.
“u” : Convert and output as an unsigned decimal.
“c” : Output a single character.
<Character output>
(1) (2) (3) (4)
% [–] [numeric string][.numeric string] s
(1) When a “–” is specified, the converted character string is output
left–justified.
If not specified, the character string is output right–justified.
(2) Specifies the number of characters to output. At least the number of
characters specified is output. If not specified, all of the characters in
the character string are output.
(3) Specifies the maximum number of characters in a converted character
string to be output.
If not specified, all of the characters in the character string are output.
(4) “s” : Specifies output of a character string.
<Floating–point output> (16i/18i only)
(1) (2) (3) (4)
% [–] [numeric string][.numeric string] [l]f
[l]e
[l]g
(1) When a “–” is specified, the converted character string is output
left–justified.
If not specified, the character string is output right–justified.
(2) Specifies the number of digits to output. At least the number of digits
specified is output. If not specified, all of the digits in the converted
character string are output.
(3) Specifies the maximum number of digits in a converted character
string to be output.
If not specified, all of the digits in the converted character string are
output.
(4) When “l” is specified, the number is a double float–type.
If not specified, the number is a float–type.
“f” : Convert and output as a signed floating–point value with
“[–]dddd.dddd” format.
“e” : Convert and output as a signed floating–point value with
“[–]d.dddde[sign]ddd” format.
“g” : Output as “f” or “e”, shorter one for output string.