添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Hello

I am using IAR and the sscanf does not appear to work, I have tried the simulator and end up with the same problem so begining to think it is my coding.


float ff;
char mytemp[20];

ssprintf( mytemp "3350.435678");
sscanf (mytemp, "%f", &ff);


I do not get the same value in the float variable after the sscanf ?

In the simulator the float value does not change after the sscanf making it look like its not working at all. Increasing stack also makes no difference.

I have also tried atof(), atoi(); etc and include the appropriate libraries :

#include "string.h"
#include "ctype.h"
#include "stdio.h"
#include "stdlib.h"

Thanks in advance.

Thanks - I see that you need to select the level of sscanf required in the library build options

Did not see that.

thanks

Hello

Thanks, yes stack was large enough, its the library size build option that created the problem.

thanks