以下是引用TonyDeng在2013-12-9 22:35:59的发言:
CLEAR ALL
CLEAR
cString = "1壹2貳叁ABC肆"
? "cString = " + cString
?
FOR nIndex = 1 TO LENC(cString)
cChar = SUBSTRC(cString, nIndex, 1)
? PADR(cChar, 2) + " 是 " + IIF(ASC(cChar) > 255, "漢字字符", "西文字符")
NEXT
?
RETURN
全角字符中的西文字符也会判断为汉字,必须用汉字字库判断。ABC