Fanuc C-Executer Operating Manual
B-62443EN-3/03E
- 167 -
1) Format specification format
% [*] [width] [{h|l}] type
type : Type of input argument, character, strings or numeric
value.
width : Maximum number of characters input from standard
input. (positive decimal number) More characters
than "width" are not converted, and not stored in
the argument. When any whitespace character is
detected before reaching to "width", or input
characters can not be converted according to
specified format, only less characters than "width"
are read.
h,l : Object size to be read.
'l' is long version and 'h' is short version.
* : Only decoding of input field is performed, but no
data is stored in the variable.
2) "type" field specification.
Char Type of input data Type of argument
-----+-------------------------------+-----------------------------
d Decimal number. Pointer to int.
o Octal number. Pointer to int.
x Hexadecimal number. Pointer to int.
i Octal, decimal or hexadecimal Pointer to int.
number
u Unsigned decimal number Pointer to unsigned int.
U Unsigned decimal number Pointer to unsigned long.
e,E Floating point number which is Pointer to float.
f composed of one or more
g,G sequential decimal number with
a sign (+,-) and decimal point
(optional), exponent('e' or
'E', optional) and signed
integer (optional).
c Character. Pointer to char.
Even whitespace character can
be read. To skip whitespace
characters, use "%ls".
s String. Pointer to character array
whose size if enough for
both input field and
terminating character (nll).
n Not read from stream or buffer Pointer to int, in which a
number of characters input
up to this point is stored.
p Value with "xxxx:yyyy" format Pointer to (void _far *).
'x' and 'y' are uppercase
hexadecimal number.