11.07.2015 Views

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

PicC 9.50 dsPIC Manual.pdf

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Library Functionsargument must be a pointer to char. The field width will limit the number of characters copied. Theresultant string will be null terminated.cCopy the next character from the input. The pointer argument is assumed to be a pointer to char. If afield width is specified, then copy that many characters. This differs from the s format in that whitespace does not terminate the character sequence.The conversion characters o, x, u, d and f may be preceded by an l to indicate that the correspondingpointer argument is a pointer to long or double as appropriate. A preceding h will indicatethat the pointer argument is a pointer to short rather than int.ExampleSee Alsoscanf("%d %s", &a, &c)with input " 12s"will assign 12 to a, and "s" to s.scanf("%3cd %lf", &c, &f)with input " abcd -3.5"will assign " abc" to c, and -3.5 to f.fscanf(), sscanf(), printf(), va_arg()Return ValueThe scanf() function returns the number of successful conversions; EOF is returned if end-of-filewas seen before any conversions were performed.190

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!