chuxianbing 发表于 2015-11-9 17:35:23

如何让tiggc中返回值为字符串

希望用tigcc写一段程序在ti-basic中调用,让其返回值为浮点数值的程序如下:
#define RETURN_VALUE
#define USE_TI89
#define USE_TI92PLUS
#define USE_V200
#define MIN_AMS 101
#include <args.h>
#include <estack.h>
void _main(void)
{
ESI argptr = top_estack;
float a = GetFloatArg (argptr);
float b = GetFloatArg (argptr);
while (GetArgType (top_estack) != END_TAG)// Clean up arguments
    top_estack = next_expression_index (top_estack);
top_estack--;
double t=a+b+0.0;
push_Float (t);
}
我希望让返回值为字符串怎么进行修改,输入参数也要为字符串怎么处理,要是让返回值为串列又怎么实现

imath 发表于 2015-11-9 21:20:38

sprintf sscanf

chuxianbing 发表于 2015-11-12 20:09:00

push_zstr始终用不了
页: [1]
查看完整版本: 如何让tiggc中返回值为字符串