11.07.2015 Views

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

CrossWorks for ARM User Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

have been promoted according to the integer promotions, but its value isconverted to short int or unsigned short int be<strong>for</strong>e printing); or that a following‘n’ conversion specifier applies to a pointer to a short int argument.•‘l’. Specifies that a following ‘d’, ‘i’, ‘o’, ‘u’, ‘x’, or ‘X’ conversion specifier appliesto a long int or unsigned long int argument; that a following ‘n’ conversionspecifier applies to a pointer to a long int argument; or has no effect on a following‘e’, ‘E’, ‘f’, ‘F’, ‘g’, or ‘G’ conversion specifier. Some <strong>CrossWorks</strong> library variants donot support the ‘l’ length modifier in order to reduce code and data spacerequirements; please ensure that you have selected the correct library in the PrintfInteger Support property of the project if you use this length modifier.•‘ll’. Specifies that a following ‘d’, ‘i’, ‘o’, ‘u’, ‘x’, or ‘X’ conversion specifier appliesto a long long int or unsigned long long int argument; that a following ‘n’conversion specifier applies to a pointer to a long long int argument. Some<strong>CrossWorks</strong> library variants do not support the ‘ll’ length modifier in order toreduce code and data space requirements; please ensure that you have selected thecorrect library in the Printf Integer Support property of the project if you use thislength modifier.If a length modifier appears with any conversion specifier other than as specifiedabove, the behavior is undefined. Note that the C99 length modifiers ‘j’, ‘z’, ‘t’, and‘L’ are not supported.Conversion specifiersThe conversion specifiers and their meanings are:•‘d’, ‘i’. The argument is converted to signed decimal in the style [-]dddd. Theprecision specifies the minimum number of digits to appear; if the valuebeing converted can be represented in fewer digits, it is expanded with leadingspaces. The default precision is one. The result of converting a zerovalue with a precision of zero is no characters.•‘o’, ‘u’, ‘x’, ‘X’. The unsigned argument is converted to unsigned octal <strong>for</strong> ‘o’,unsigned decimal <strong>for</strong> ‘u’, or unsigned hexadecimal notation <strong>for</strong> ‘x’ or ‘X’ in thestyle dddd; the letters ‘abcdef’ are used <strong>for</strong> ‘x’ conversion and the letters ‘ABCDEF’<strong>for</strong> ‘X’ conversion. The precision specifies the minimum number of digits toappear; if the value being converted can be represented in fewer digits, it isexpanded with leading spaces. The default precision is one. The result ofconverting a zero value with a precision of zero is no characters.•‘f’, ‘F’. A double argument representing a floating-point number is converted todecimal notation in the style [-]ddd.ddd, where the number of digits afterthe decimal-point character is equal to the precision specification. If the precisionis missing, it is taken as 6; if the precision is zero and the ‘#’ flag is not specified, nodecimal-point character appears. If a decimal-point character appears, at least onedigit appears be<strong>for</strong>e it. The value is rounded to the appropriate number of digits.A double argument representing an infinity is converted to ‘inf’. A doubleargument representing a NaN is converted to ‘nan’. The ‘F’ conversion specifierChapter 28 - Input/output functions283

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

Saved successfully!

Ooh no, something went wrong!