Standard I/O Function Interface Printf - Fujitsu F2MC-16L User Manual

Hide thumbs Also See for F2MC-16L:
Table of Contents

Advertisement

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.
I Printf
[Interface]
Format
Parameters
Return parameter chrcnt
[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:...
❍ field ........
❍ l..............
❍ type........
30
int chrcnt = printf(B *format [,data1 [,data2 ...]]);
format
:Pointer to the output format string
data1, ...
:Output data
:Number of characters output
A control character that specifies the output format. The following can be
specified.
Control
Format
Character
-
Left justify
+
Output the sign
#
Output the radix
Add leading spaces
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.
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.
A control character that specifies the type of the output data. The following
types are available.
*
Processing When Omitted
Right justify
No sign
No radix
No leading spaces

Advertisement

Table of Contents
loading

This manual is also suitable for:

F2mc-16xlF2mc-16F2mc-16hF2mc-16f

Table of Contents