返回按区位码转化的汉字

/******************************************************************************/ //函数名: gf_GetWord //功能说明:返回按区位码转化的汉字 //输入参数:1.as_wordnum :待转换的数字 //输出参数:无 //返回值: string 转换后的汉字 //函数完成:woods //调用关系:本函数为公共外部函数,可被系统开发的任何地方调用 /******************************************************************************/ //返回按区域码转化的汉字 String ls_word String   ls_temp[] int  i,j String ls_tmp

ls_tmp=trim(as_wordnum) //验证是否合法 if mod(len(ls_tmp),4)<>0 then  return '不合法' end if //将区域码每2个字符作为一个存入数组 j=1 for i=1 to len(ls_tmp)  ls_temp[j]=mid(ls_tmp,i,2)    i=i+1  j=j+1 next //将数组之转化成汉字 for i=1 to j - 1  if integer(ls_temp[i])<16 or integer(ls_temp[i])>55 or integer(ls_temp[i+1])<1 or integer(ls_temp[i])>82 then   i=i+1   continue  end if    ls_word=ls_word+(char(integer(ls_temp[i])+160) + char(integer(ls_temp[i+1])+160))    i=i+1 next

return ls_word

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值