51Testing软件测试论坛

标题: 请求大侠帮忙 [打印本页]

作者: newcom    时间: 2009-5-6 16:18
标题: 请求大侠帮忙
小生刚接触loadrunner 希望各位大侠多多帮助

        if (strcmp(lr_eval_string("{Newuser}","0" ) then
                           lr_log_message("login fales");
        else
                lr_log_message("login susser"):

loginfo.c (18): too many arguments to `lr_eval_string'
loginfo.c (18): syntax error; found `then' expecting `)'
loginfo.c (18): syntax error; found `then' expecting `)'
loginfo.c (19): undeclared identifier `then'
loginfo.c (19): syntax error; found `lr_log_message' expecting `;'
loginfo.c (20): unrecognized statement
loginfo.c (21): syntax error; found `lr_log_message' expecting `;'
loginfo.c (21): syntax error; found `:' expecting `;'
loginfo.c (21): illegal statement termination
loginfo.c (21): skipping `:'
c:\\documents and settings\\wangbolin\\local settings\\temp\\noname36\\\\combined_noname36.c (6): 10 errors, not writing pre_cci.ci
作者: marco    时间: 2009-5-6 18:21
少个括号
作者: newcom    时间: 2009-5-7 11:04
标题: 已解决
if (strcmp(lr_eval_string("{Newuser})","0" )>0 )

                lr_log_message("login fales");
          else
                lr_log_message("login susser"):

loginfo.c (18): too many arguments to `lr_eval_string'
loginfo.c (22): syntax error; found `:' expecting `;'
loginfo.c (22): illegal statement termination
loginfo.c (22): skipping `:'
e:\\eltest\\if\\\\combined_if.c (6): 4 errors, not writing pre_cci.ci

是不是strcmp 函数使用有问题?

[ 本帖最后由 newcom 于 2009-5-7 11:28 编辑 ]
作者: 51testing_zhj    时间: 2009-5-7 11:23
要修改成 这个 样子把 strcmp(lr_eval_string("{Newuser}"),"0" )




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2