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.

[参考译文] TMS320F28069:atof()不能被使用

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

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/568223/tms320f28069-atof-cannot-be-used

器件型号:TMS320F28069
Thread 中讨论的其他器件:controlSUITE

尊敬的所有人:

我包含了标头 stdlib.h 并使用了函数 atof()

但是、编译器无法识别变量 double 的类型。

我错过了什么?  

我使用的是 controlSUITE 中的示例。

此致、

Barry

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

    您能否附上您观察到的错误的屏幕截图?

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

    尊敬的 Gautam:

    我发现我忘记在字符串上添加""的问题。

    浮点32温度;

    更换  

    温度= atof(1.23);

    使用

    temp = atof("1.23");

    可以解决问题。

    此致、

    Barry

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

    祝您好运、
    Gautam