double atof( const char *string); //申明函数
Action()
{
float UpPrice1;
float i=0.1;
char* price1=(char*)calloc(100,sizeof(char)); //请求存储空间
//Correlation comment - Do not change!Original value='7.89' Name ='CorrelationParameter_2'
web_reg_save_param_ex(
"ParamName=CorrelationParameter_2",
"LB=UpPrice\":",
"RB=,",
LAST);
web_submit_data("PersonalMarketHandler.ashx_17",
"Action=http://{URL}/Handlers/Default/StockMarket/PersonalMarketHandler.ashx/?method=GetDefaultWarningOfCode",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://{URL}/Pages/Default/Home/MatchIndex.aspx?TraderID={CorrelationParameter_1}",
"Snapshot=t219.inf",
"Mode=HTTP",
ITEMDATA,
"Name=code", "Value={code}", ENDITEM,
LAST);
lr_save_string(lr_eval_string ("{CorrelationParameter_2}"),"UpPrice"); //将关联的字符串值存入参数变量UpPrice中
UpPrice1=atof(lr_eval_string ("{UpPrice}"))+i; //将字符串的UpPrice转换为float,并将float值相加
sprintf(price1,"%.2f",UpPrice1); // 将float转换为string
lr_save_string(price1,"price"); //将转换的字符串值存入参数变量price中
lr_error_message (":%s",lr_eval_string ("{price}"));
web_submit_data("PersonalMarketHandler.ashx_19",
"Action=http://{URL}/Handlers/Default/StockMarket/PersonalMarketHandler.ashx/?method=AddOrUpdateWarningCode",
"Method=POST",
"RecContentType=text/plain",
"Referer=http://{URL}/Pages/Default/Home/MatchIndex.aspx?TraderID={CorrelationParameter_1}",
"Snapshot=t221.inf",
"Mode=HTTP",
ITEMDATA,
"Name=id", "Value=0", ENDITEM,
"Name=code", "Value={code}", ENDITEM,
"Name=upPrice", "Value={price}", ENDITEM,
"Name=downPrice", "Value={CorrelationParameter_3}", ENDITEM,
LAST);
free(price1);
return 0;
}