hopewell 发表于 2012-7-23 08:18 
请问可不可以解释下indexw的用法 比如下面这些例子,我看不太明白。。
s='asdf adog dog';
p='dog ';
x=indexw(s,p);
put x;
result:
11
s='abcdef x=y';
p='def';
x=indexw(s,p);
put x;
result:
0
x="abc,def@ xyz";
abc=indexw(x, " abc ", "@");
put abc;
result:
0
x="abc,def@ xyz";
comma=indexw(x, ",", "@");
put comma;
result:
0
x='abc,def% xyz';
def=indexw(x, 'def', '%,');
put def;
result:
5
x="abc,def@ xyz";
at=indexw(x, "@", "@");
put at;
result:
0
x="abc,def@ xyz";
xyz=indexw(x, " xyz", "@");
put xyz;
result:
9
另外如果这段想写进macro里面应该怎么改写阿
多谢!