Next: Input Format Examples, Previous: Input Data Formats, Up: Input Data Formats [Contents][Index]
The format types consist of a single character from the following list.
LUX does not support C types u
(unsigned integer), c
(character).
d
Decimal integer. %hd
generates a word
, %ld
and
%d
generate long
s, %jd
generates a int64
.
i
Integer, which may be decimal, octal (leading 0
), or hexadecimal
(leading 0x
or 0X
). %hi
generates a word
,
%li
and %i
generate long
s, and %ji
generates a int64
.
o
Octal integer. %ho
generates a word
, %lo
and
%o
generate long
s, and %jo
generates a
int64
.
x
Hexadecimal integer. %hx
generates a word
, %lx
and
%x
generate long
s, and %jx
generates an
int64
.
e, f, g
Floating-point numbers, consisting of an optional sign, a string of
numbers containing an optional decimal point, and an optional exponent
field containing an e
or E
and an optionally signed
integer exponent. %e
, %f
, and %g
generate
float
s, %le
, %lf
, and %lg
generate
double
s.
s
A string consisting of the next non-whitespace characters (up to the field width). The result may be shorter than the field width, if whitespace or the end of the string intervene. If no field width is specified, then the next non-whitespace word is returned.
S
A string consisting of the next non-newline characters (up to the field width).
[...]
Matches the longest non-empty string of input characters from the set
between brackets. If you want to include ]
in the set, then
place it directly after the initial [
. Use a minus sign to
indicate a range of characters, e.g. 0-9
for 0
through
9
. If you want to include a minus sign itself, then make it the
last element before the closing ]
.
[^...]
Matches the longest non-empty string of input characters that are not in
the set between brackets. If you want to include ]
in the set,
then place it directly after the initial [^
. For the rest,
similar to [...]
T
A number in sexagesimal notation (e.g., times in hours, minutes, and seconds, or angles in degrees, minutes, and seconds). The number consists of two or more numerical components separated by any amount of non-digits. Only the first numerical component may be signed. All but the last numerical component must be integers; the last one may be floating-point (with a decimal point and/or exponent). The first numerical component counts units and each next numerical component counts 1/60th as much as the previous one.
z
A number in complex notation, consisting of an optionally signed
floating-point number followed by a signed floating-point number
followed by an i
or I
. The first number indicates the
real part, and the second number the complex part of the result.
%
Literal %
. No assignment is made.
Next: Input Format Examples, Previous: Input Data Formats, Up: Input Data Formats [Contents][Index]