1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
scanf_conversion(1) Scilab Function scanf_conversion(1)
NAME
scanf_conversion - scanf, sscanf, fscanf conversion specifications
DESCRIPTION
Each conversion specification in the format parameter contains the follow-
ing elements:
+ The character % (percent sign)
+ The optional assignment suppression character *
+ An optional numeric maximum field width
+ A conversion code
The conversion specification has the following syntax:
[*][width][size]convcode.
The results from the conversion are placed in v_i arguments unless you
specify assignment suppression with * (asterisk). Assignment suppression
provides a way to describe an input field that is to be skipped. The input
field is a string of nonwhite-space characters. It extends to the next
inappropriate character or until the field width, if specified, is
exhausted.
The conversion code indicates how to interpret the input field.
You should not specify the v_i parameter for a suppressed field. You can
use the following conversion codes:
% :Accepts a single % (percent sign) input at this point; no assign-
ment is done.
d, i :Accepts a decimal integer;
u :Accepts an unsigned decimal integer;
o :Accepts an octal integer;
x :Accepts a hexadecimal integer;
e,f,g :Accepts a floating-point number. The next field is converted
accordingly and stored through the corresponding parameter, which
should be a pointer to a float. The input format for floating-point
numbers is a string of digits, with the following optional charac-
teristics:
+ It can be a signed value.
+ It can be an exponential value, containing a decimal point
followed by an exponent field, which consists of an E or an e
followed by an (optionally signed) integer.
+ It can be one of the special values INF, NaN,
s :Accepts a string of characters.
c :character value is expected. The normal skip over white space is
suppressed.
SEE ALSO
scanf, scanf, fscanf
|