mystring.c 添加字符串转浮点函数

This commit is contained in:
ranchuan
2023-10-17 18:03:00 +08:00
parent cbbb2af298
commit dc92f48f75
8 changed files with 61 additions and 13 deletions

View File

@@ -6,8 +6,8 @@
#define BUILD_DATE "2023-10-16 18:50:56"
#define SOFT_VERSION "2.00"
#define BUILD_DATE "2023-10-17 09:42:57"
#define SOFT_VERSION "2.01"

View File

@@ -90,8 +90,8 @@ static int test(list_def *argv)
cmd_print("param num too less.");
return -1;
}
int num=str_atoi(list_get_str(argv,1));
cmd_print("test num=%d,hex=%x",num,num);
float num=str_atof(list_get_str(argv,1));
cmd_print("test num=%f",num);
return 0;
}
//commend_export(test,test,"cmd test")