
36
space, a tab, or a new line) may cause
__scanf_Num
to ignore
whitespace characters from keyboard. Other nonwhitespace
characters, excluding the % sign, cause
__scanf_Num
to ignore each
matching character from the input. It begins to interpret the first
nonmatching character as the value of variable that is being read.
For each C variable whose address is included in the argument list to
_scanf_Num
, there must be a format specification embedded in the
format_string
. For the complete format specification accepted by the
_scanf
function, please refer to the
scanf
function in Turbo C++.
If you want input a float value, the value type is “ double “, not
“ float “.
Returns
:
The
_scanf_Num
function returns the number of input items that were
successfully read, converted, and saved in variables. A return value
equal to EOF means that an end-of-file was encountered during the
read operation.
_scanf_password
Purpose
:
Use
_scanf_password
to read character strings(only display * for the
passwrd ) from the standard input file
stdin
and covert the strings to
values of C variables according to specified formats.
Syntax
:
int _scanf_password(const char *format_string, …);
Example call
:
_scanf_password (“ %d:%d:%d”, &hour, &minute, &second);
Includes
:
#include
“
UserLib.h
"
Description
:
The
_scanf_password
function accepts a variable number arguments,
which it interprets as addresses of C variables, and reads character
strings, representing their values. It converts them to their internal
representations using formatting commands embedded in the
argument
format_string
, which must be present in a call to
_scanf_password
.
The interpretation of the variables depends on the
format_string
. The
formatting command for each variable begins with a % sign and can
contain other characters as well. A whitespace character (a blank
space, a tab, or a new line) may cause
__scanf_password
to ignore
whitespace characters from keyboard. Other nonwhitespace
characters, excluding the % sign, cause
__scanf_password
to ignore
each matching character from the input. It begins to interpret the first
nonmatching character as the value of variable that is being read.
For each C variable whose address is included in the argument list to
_scanf_password
, there must be a format specification embedded in
Содержание PT-10
Страница 4: ...3 Keyboard Wedge 99 System 101 Power 102 Other 102 ...
Страница 13: ...12 6 Development Flow Chart ...
Страница 53: ...52 Returns No returns Notes ...