51Testing软件测试论坛
标题:
如何把一个函数传递给参数?
[打印本页]
作者:
断寒
时间:
2006-3-23 17:33
标题:
如何把一个函数传递给参数?
xml_input()
{
int n;
for(n=1;n<20;n++)
lr_output_message("递增"+n);
return 0;
}
Action()
{
web_submit_data("lrpd.jsp_2",
"Action=http://192.168.103.170:9080/tms2006/gl_jsps/gl_pz/gl_pzlr/lrpd.jsp",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.103.170:9080/tms2006/gl_jsps/gl_pz/gl_pzlr/pagequery.jsp",
"Snapshot=t23.inf",
"Mode=HTML",
ITEMDATA,
"Name=q_k_temp_nr", "Value={XML_Input}", ENDITEM,
LAST);
return 0;
}
如何把xml_input()传递给Value={XML_Input}???
作者:
断寒
时间:
2006-3-23 17:37
char *xml_input="abcdef";
Action()
{
lr_save_string(xml_input,"XML_Input");
web_submit_data("lrpd.jsp_2",
"Action=http://192.168.103.170:9080/tms2006/gl_jsps/gl_pz/gl_pzlr/lrpd.jsp",
"Method=POST",
"RecContentType=text/html",
"Referer=http://192.168.103.170:9080/tms2006/gl_jsps/gl_pz/gl_pzlr/pagequery.jsp",
"Snapshot=t23.inf",
"Mode=HTML",
ITEMDATA,
"Name=q_k_temp_nr", "Value={XML_Input}", ENDITEM,
LAST);
return 0;
}
这样可以传递,不知道函数如何传递
作者:
Koffer
时间:
2006-3-23 18:18
函数需要加上返回类型,应该是一样的了!
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2