提示数组下标超界?
运行下边代码,提示下标超界?gcfun(63389)
FUNCTION gcfun(num)
IF num < 1
RETURN ""
ENDIF
LOCAL a[1], c1, c2, c3, c4, c5
ALINES(a, "一,二,三,四,五,六,七,八,九", ",")
c1 = num%10
c2 = INT(num/10%10)
c3 = int(num/100%10)
c4 = int(num/(10*10*10))
c5 = int(num/(10*10*10*10))
RETURN IIF(c5>0,IIF(c5>0,a[c5],"")+"万","")+IIF(c4>0, IIF(c4>0,a[c4],"")+"千","")+IIF(c3>0, IIF(c3>0,a[c3],"")+"百","")+IIF(c2>0, IIF(c2>0,a[c2],"")+ "十","")+;
IIF(c2=0,IIF(c1=0,"","零"),"")+ IIF(c1>0, a[c1], "")
ENDIF
ENDIF
ENDFUNC
[此贴子已经被作者于2017-3-27 16:24编辑过]