想让大家帮我看看语法错误谢谢!
for(i=0; i<5; i++){ GUI_load("&gui_item");
call "&file_item"();
wait(5);
GUI_unload_all();
}
运行说CALL语句出错不明白
先前我定义了
GUI——ITEM放着GUI文件地址的数组
FILE——ITEM放着FILE文件地址的数组。 能这样调用么?不太懂。
gui_load("d:\\test\\1.gui")这样不会错- -
同样的call你查WR联机帮助。 GUI_load("&gui_item");
这个前面要加个地址
path = "c:\\files\\";
GUI_load (path & "my_file.gui");
这样就不会错啦 static gui_item [ ]={
"D:\example\Checkpoint\checkpointmore\checkpointmore.gui",
"D:\example\Checkpoint\checkpointmore\checkpointmore.gui",
"D:\example\Checkpoint\imagecheckpoint\imagecheckpoint.gui",
"D:\example\Checkpoint\scriptrun\scriptrun.gui",
"D:\example\Checkpoint\scriptall\scriptall.gui"
};
static file_item [ ]={
"D:\\example\\Checkpoint\\checkpointmore",
"D:\\example\\Checkpoint\\checkpointmore",
"D:\\example\\Checkpoint\imagecheckpoint",
"D:\\example\Checkpoint\scriptrun",
"D:\\example\\Checkpoint\\scriptall"
};
for(i=0; i<5; i++)
{ GUI_load("&gui_item");
eval("call "&file_item"();");
wait(5);
GUI_unload_all();
}
我这样写不行吗?:,(
[ Last edited by coralsong on 2004-11-2 at 10:46 ] 去掉&看行不行? 去掉引号... "D:\\example\\Checkpoint\\checkpointmore",
在前面加上 call "D:\\example\\Checkpoint\\checkpointmore",看一下了 call is parameterized with the eval function in order to run four tests in a single call loop.
so
eval ("call \"" & file_item & "\"();");
页:
[1]