问ASCAN函数问题?
ASCAN(ArrayName, eExpression [, nStartElement [, nElementsSearched [, nSearchColumn [, nFlags ]]]])我要不分大小写,这几个参数,怎么看的,看不懂。nFd=Ascan(aMyAry,ary1(nCount),1,0,0,1) &&或者 nFd=Ascan(aMyAry,upper(ary1(nCount)))
nFd=Ascan(aMyAry,ary1(nCount),1,0,0,1),我是1个个试,才试出这个。。
目前AFIELDS(aMyAry,Alias())的全是大写的,所以我用upper(ary1(nCount)),万一,改天,AFIELDS(aMyAry,Alias())变为小写了,怎么办。所以还是要在Ascan()搞。
local ary1(5)
ary1(1)="Name1"
ary1(2)="Name2"
ary1(3)="Name3"
ary1(4)="Name4"
ary1(5)="Name5"
Create Cursor tmp(Name1 C(20),Name2 L,Name3 N(20),Name4 B(2),Name5 L)
nFieldNum=AFIELDS(aMyAry,Alias())
FOR nCount = 1 TO alen(ary1)
nFd=Ascan(aMyAry,ary1(nCount),1,0,0,1) &&或者 nFd=Ascan(aMyAry,upper(ary1(nCount)))
if nFd>0
?"Ok ",ary1(nCount)
else
?"Err ",ary1(nCount)
endif
endfor
[此贴子已经被作者于2016-2-29 12:21编辑过]