This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CCS/SW-EK-TM4C123GXL:UARTprintf 问题

Guru**** 3040470 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/864382/ccs-sw-ek-tm4c123gxl-uartprintf-problem

器件型号:SW-EK-TM4C123GXL

工具/软件:Code Composer Studio

您好!

我 的 UARTprintf 有问题:

UARTprintf ("值为%d\n",2)打印值为2


但是


UARTprintf ("值为%d\n"2.1)打印值为760

实际上、对于任何十进制数、它总是错误的。 我是否误解了%d 格式?

谢谢