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.

produces ‘INF’ or ‘NAN’ instead of ‘inf’ or ‘nan’, respectively. Some <strong>CrossWorks</strong>library variants do not support the ‘f’ and ‘F’ conversion specifiers in order toreduce code and data space requirements; please ensure that you have selected thecorrect library in the Printf Floating Point Support property of the project if youuse these conversion specifiers.•‘e’, ‘E’. A double argument representing a floating-point number is converted inthe style [-]d.dddedd, where there is one digit (which is nonzero if theargument is nonzero) be<strong>for</strong>e the decimal-point character and the number of digitsafter it is equal to the precision; if the precision is missing, it is taken as 6; if theprecision is zero and the ‘#’ flag is not specified, no decimal-point characterappears. The value is rounded to the appropriate number of digits. The ‘E’conversion specifier produces a number with ‘E’ instead of ‘e’ introducing theexponent. The exponent always contains at least two digits, and only as manymore digits as necessary to represent the exponent. If the value is zero, theexponent is zero. A double argument representing an infinity is converted to ‘inf’.A double argument representing a NaN is converted to ‘nan’. The ‘E’ conversionspecifier produces ‘INF’ or ‘NAN’ instead of ‘inf’ or ‘nan’, respectively. Some<strong>CrossWorks</strong> library variants do not support the ‘f’ and ‘F’ conversion specifiers inorder to reduce code and data space requirements; please ensure that you haveselected the correct library in the Printf Floating Point Support property of theproject if you use these conversion specifiers.•‘g’, ‘G’. A double argument representing a floating-point number is converted instyle ‘f’ or ‘e’ (or in style ‘F’ or ‘e’ in the case of a ‘G’ conversion specifier), withthe precision specifying the number of significant digits. If the precision is zero, itis taken as one. The style used depends on the value converted; style ‘e’ (or ‘E’) isused only if the exponent resulting from such a conversion is less than -4 or greaterthan or equal to the precision. Trailing zeros are removed from the fractionalportion of the result unless the ‘#’ flag is specified; a decimal-point characterappears only if it is followed by a digit. A double argument representing an infinityis converted to ‘inf’. A double argument representing a NaN is converted to‘nan’. The ‘G’ conversion specifier produces ‘INF’ or ‘NAN’ instead of ‘inf’ or‘nan’, respectively. Some <strong>CrossWorks</strong> library variants do not support the ‘f’ and‘F’ conversion specifiers in order to reduce code and data space requirements;please ensure that you have selected the correct library in the Printf Floating PointSupport property of the project if you use these conversion specifiers.•‘c’. The argument is converted to an unsigned char, and the resulting character iswritten.•‘s’. The argument is be a pointer to the initial element of an array of character type.Characters from the array are written up to (but not including) the terminating nullcharacter. If the precision is specified, no more than that many characters arewritten. If the precision is not specified or is greater than the size of the array, thearray must contain a null character.284 Chapter 28 Standard C Library Reference

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

Saved successfully!

Ooh no, something went wrong!