Declaration:
int fscanf(unsigned long stream, char format[], ... );
Description
Scans and formats input from a .
format. Finally, fscanf 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.
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.
|
fscanf 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
fscanf returns the number of input fields successfully scanned, converted and stored. The return value does not include the scanned fields that were not stored. If fscanf attempts to read at the end-of-file, then EOF will be returned. If no fields are stored, then 0 will be returned.
|