/******************************************************************************/ //函数名: 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