EasyManua.ls Logo

Fujitsu F2MC-16L - 4.3 Standard I;O Function Interface Printf

Fujitsu F2MC-16L
68 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
30
CHAPTER 4 Program Reference for the Standard I/O Library
4.3 Standard I/O Function Interface Printf
Outputs a character string to the standard output device in accordance with the
specified format.
Printf
[Interface]
Format int chrcnt = printf(B *format [,data1 [,data2 ...]]);
Parameters format :Pointer to the output format string
data1, ... :Output data
Return parameter chrcnt :Number of characters output
[Description]
Outputs a character string to the standard output device in accordance with the specified format.
The control specifiers in the output format string specify the type and output format of the
parameters following the format parameter. Characters other than control specifiers in the format
are output directly to the standard I/O device. Control specifiers start with the percent (%)
character and specify the format as follows.
%[control][field][l]type
control:... A control character that specifies the output format. The following can be
specified.
field ........ A numeric value that specifies the number of characters to output in the
output data. The output data is not truncated if it requires more than the
specified number of characters. If the number starts with a zero (0), the
leading spaces of the output data are filled with zeros.
If the number of output characters is omitted, the output data is output in the
required number of characters.
l.............. Indicates that the type of the corresponding data is long (4-byte data). Such
data must be pushed onto the stack as four bytes (for a C program, the data
type must be long). If omitted, the stack data is treated as 2-byte data.
type........ A control character that specifies the type of the output data. The following
types are available.
Control
Character
Format Processing When Omitted
-
+
#
Left justify
Output the sign
Output the radix
Add leading spaces
Right justify
No sign
No radix
No leading spaces
]
*

Other manuals for Fujitsu F2MC-16L

Related product manuals