11.07.2015 Views

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

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.

•‘p’. The argument is a pointer to void. The value of the pointer is converted in thesame <strong>for</strong>mat as the ‘x’ conversion specifier with a fixed precision of 2*sizeof(void*).•‘n’. The argument is a pointer to signed integer into which is written the number ofcharacters written to the output stream so far by the call to the <strong>for</strong>matting function.No argument is converted, but one is consumed. If the conversion specificationincludes any flags, a field width, or a precision, the behavior is undefined.•‘%’. A ‘%’ character is written. No argument is converted.Note that the C99 width modifier ‘l’ used in conjuction with the ‘c’ and ‘s’ conversionspecifiers is not supported and nor are the conversion specifiers ‘a’ and ‘A’.Formatted input control stringsThe <strong>for</strong>mat is composed of zero or more directives: one or more white-space characters,an ordinary character (neither ‘%’ nor a white-space character), or a conversionspecification.OverviewEach conversion specification is introduced by the character ‘%’. After the ‘%’, thefollowing appear in sequence:•An optional assignment-suppressing character ‘*’.•An optional nonzero decimal integer that specifies the maximum field width (incharacters).•An optional length modifier that specifies the size of the receiving object.•A conversion specifier character that specifies the type of conversion to be applied.The <strong>for</strong>matted input function executes each directive of the <strong>for</strong>mat in turn. If a directivefails, the function returns. Failures are described as input failures (because of theoccurrence of an encoding error or the unavailability of input characters), or matchingfailures (because of inappropriate input).A directive composed of white-space character(s) is executed by reading input up tothe first non-white-space character (which remains unread), or until no morecharacters can be read.A directive that is an ordinary character is executed by reading the next characters ofthe stream. If any of those characters differ from the ones composing the directive, thedirective fails and the differing and subsequent characters remain unread. Similarly, ifend-of-file, an encoding error, or a read error prevents a character from being read, thedirective fails.Chapter 28 - Input/output functions285

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

Saved successfully!

Ooh no, something went wrong!