一、如何获得汉字的拼音:在Windows的目录下好像有一个文件,里面记载所有汉字和拼音。如找不到此文件,也可以到网上下载,最麻烦的方法是自己输入。二、如何判断是汉字还是英文字符: 在Windows下,汉字的Ascii码双字节的,好像都是负数。 举例:? asc("在") -11046 ? chr(-11046) 在对于英文及半角字串比较简单: if asc(字符串) >= 0 and asc(字符串) <=255 then 是英文或其它半角字串 if (asc(字符串) >= asc("a") and asc(字符串) <=asc("z") ) OR _ (asc(字符串) >= asc("A") and asc(字符串) <=asc("Z") ) then 是英文字符
在Windows下,汉字的Ascii码双字节的,好像都是负数。
举例:? asc("在")
-11046 ? chr(-11046)
在对于英文及半角字串比较简单:
if asc(字符串) >= 0 and asc(字符串) <=255 then 是英文或其它半角字串
if (asc(字符串) >= asc("a") and asc(字符串) <=asc("z") ) OR _
(asc(字符串) >= asc("A") and asc(字符串) <=asc("Z") ) then 是英文字符