function inArray(str,arr)
inArray=false
if not isnull(arr) and isarray(arr) then
for ii=0 to ubound(arr)
if ucase(trim(arr(ii)))=ucase(trim(str)) then
inArray=true
exit function
end if
next
end if
end function
使用
arr= Array("Jan","Feb","Mar","Apr","Sep","Oct", "Nov","Dec")
inArray("Feb",arr) output true
inArray("May",arr) output false