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.

[参考译文] TMS320F28379D:嵌套 switch 语句是否存在问题?

Guru**** 2434370 points


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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/1532987/tms320f28379d-is-there-an-issue-with-nested-switch-statements

部件号:TMS320F28379D

工具/软件:

CCS 在正确格式化嵌套 switch 语句时遇到问题。  是否应该注意到一些器件或编译器问题?

“Correct Indentation“(更正缩进)产生以下格式:

“Case Receive16“应该是左侧的一个选项卡、与“Case ReceiveCommand“对齐。   

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

    我同意并且有趣的是、如果您使用“源->格式“(CTRL+SHIFT+F)、它就是这样做的。 但当您使用“源->正确缩进“(CTRL+I) 时、它看起来就像在屏幕截图中一样。 您可以通过编辑代码样式->格式化板设置来调整行为。 在 C/C++ Advanced 设置中。