11.07.2015 Views

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

MSP430 IAR C/C++ Compiler reference guide - Rice University

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

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

Configuration symbols for printf and scanfFor information about the @ operator, see Controlling data and function placement inmemory, page 116.Configuration symbols for printf and scanfWhen you set up your application project, you typically need to consider what printfand scanf formatting capabilities your application requires, see Choosing formattersfor printf and scanf, page 51.If the provided formatters do not meet your requirements, you can customize the fullformatters. However, that means you need to rebuild the runtime library.The default behavior of the printf and scanf formatters are defined by configurationsymbols in the file DLIB_Defaults.h.The following configuration symbols determine what capabilities the function printfshould have:Printf configuration symbolsIncludes support for_DLIB_PRINTF_MULTIBYTEMultibyte characters_DLIB_PRINTF_LONG_LONGLong long (ll qualifier)_DLIB_PRINTF_SPECIFIER_FLOAT Floating-point numbers_DLIB_PRINTF_SPECIFIER_AHexadecimal floats_DLIB_PRINTF_SPECIFIER_NOutput count (%n)_DLIB_PRINTF_QUALIFIERSQualifiers h, l, L, v, t, and z_DLIB_PRINTF_FLAGS Flags -, +, #, and 0_DLIB_PRINTF_WIDTH_AND_PRECISION Width and precision_DLIB_PRINTF_CHAR_BY_CHAROutput char by char or bufferedTable 15: Descriptions of printf configuration symbolsWhen you build a library, the following configurations determine what capabilities thefunction scanf should have:Scanf configuration symbols_DLIB_SCANF_MULTIBYTE_DLIB_SCANF_LONG_LONG_DLIB_SCANF_SPECIFIER_FLOAT_DLIB_SCANF_SPECIFIER_N_DLIB_SCANF_QUALIFIERSTable 16: Descriptions of scanf configuration symbolsIncludes support forMultibyte charactersLong long (ll qualifier)Floating-point numbersOutput count (%n)Qualifiers h, j, l, t, z, and L62<strong>MSP430</strong> <strong>IAR</strong> C/<strong>C++</strong> <strong>Compiler</strong>Reference Guide

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

Saved successfully!

Ooh no, something went wrong!