| 发表于:2007-09-03 19:08:2515楼 得分:0 |
public function py(mystr as string) as string if asc(mystr) < 0 then if asc(left(mystr, 1)) < asc( "啊 ") then py = "0 " exit function end if if asc(left(mystr, 1)) > = asc( "啊 ") and asc(left(mystr, 1)) < asc( "芭 ") then py = "a " exit function end if if asc(left(mystr, 1)) > = asc( "芭 ") and asc(left(mystr, 1)) < asc( "擦 ") then py = "b " exit function end if if asc(left(mystr, 1)) > = asc( "擦 ") and asc(left(mystr, 1)) < asc( "搭 ") then py = "c " exit function end if if asc(left(mystr, 1)) > = asc( "搭 ") and asc(left(mystr, 1)) < asc( "蛾 ") then py = "d " exit function end if if asc(left(mystr, 1)) > = asc( "蛾 ") and asc(left(mystr, 1)) < asc( "发 ") then py = "e " exit function end if if asc(left(mystr, 1)) > = asc( "发 ") and asc(left(mystr, 1)) < asc( "噶 ") then py = "f " exit function end if if asc(left(mystr, 1)) > = asc( "噶 ") and asc(left(mystr, 1)) < asc( "哈 ") then py = "g " exit function end if if asc(left(mystr, 1)) > = asc( "哈 ") and asc(left(mystr, 1)) < asc( "击 ") then py = "h " exit function end if if asc(left(mystr, 1)) > = asc( "击 ") and asc(left(mystr, 1)) < asc( "喀 ") then py = "j " exit function end if if asc(left(mystr, 1)) > = asc( "喀 ") and asc(left(mystr, 1)) < asc( "垃 ") then py = "k " exit function end if if asc(left(mystr, 1)) > = asc( "垃 ") and asc(left(mystr, 1)) < asc( "妈 ") then py = "l " exit function end if if asc(left(mystr, 1)) > = asc( "妈 ") and asc(left(mystr, 1)) < asc( "拿 ") then py = "m " exit function end if if asc(left(mystr, 1)) > = asc( "拿 ") and asc(left(mystr, 1)) < asc( "哦 ") then py = "n " exit function end if if asc(left(mystr, 1)) > = asc( "哦 ") and asc(left(mystr, 1)) < asc( "啪 ") then py = "o " exit function end if if asc(left(mystr, 1)) > = asc( "啪 ") and asc(left(mystr, 1)) < asc( "期 ") then py = "p " exit function end if if asc(left(mystr, 1)) > = asc( "期 ") and asc(left(mystr, 1)) < asc( "然 ") then py = "q " exit function end if if asc(left(mystr, 1)) > = asc( "然 ") and asc(left(mystr, 1)) < asc( "撒 ") then py = "r " exit function end if if asc(left(mystr, 1)) > = asc( "撒 ") and asc(left(mystr, 1)) < asc( "塌 ") then py = "s " exit function end if if asc(left(mystr, 1)) > = asc( "塌 ") and asc(left(mystr, 1)) < asc( "挖 ") then py = "t " exit function end if if asc(left(mystr, 1)) > = asc( "挖 ") and asc(left(mystr, 1)) < asc( "昔 ") then py = "w " exit function end if if asc(left(mystr, 1)) > = asc( "昔 ") and asc(left(mystr, 1)) < asc( "压 ") then py = "x " exit function end if if asc(left(mystr, 1)) > = asc( "压 ") and asc(left(mystr, 1)) < asc( "匝 ") then py = "y " exit function end if if asc(left(mystr, 1)) > = asc( "匝 ") then py = "z " exit function end if else if ucase(mystr) <= "z " and ucase(mystr) > = "a " then py = ucase(left(mystr, 1)) else py = mystr end if end if end function | | |
|