Declaration:
int sscanf(char buf[], char format[], ... );
Description
The sscanf function parses the buf string in accordance with the format line.
sscanf scans a series of input fields one character at a time reading from a stream. After that, each field is formatted in accordance with a format specifier passed to sscanf in the format string pointed to by format. Finally, sscanf stores the formatted input at the address passed to it as the argument following the format. The number of format specifiers and addresses must be the same as the number of input fields.
Notes
1.
|
Your arguments passed to this function shall match the format line. In case of mismatch, the ChipProg program may crash, because it cannot check the correspondence between the format string and parameters passed. For details on format specifiers, see the scanf Format Specifiers.
|
2.
|
All arguments for this function shall be arrays, because only the array parameters are passed by address to functions. Also, see example for scanf.
|
sscanf can stop scanning a particular field before it reaches the normal end-of-field character (whitespace) or it can terminate entirely for a number of reasons. See scanf for a discussion on possible causes.
Returned Value
|