PB实现人民币大写转换函数

更新时间:2023-05-14 01:35:50 阅读: 评论:0

PB实现⼈民币⼤写转换函数
//------------------------------------------
//gf_cm_upper_number(decimal  ar_amount) return string
// 参数ar_amount,类型 decimal
// 返回值类型 string
//
//-------------------------------------------
string ls_input
integer li_strlen, li_cursor, li_count
string ls_result, ls_digit
枕戈integer li_digit
/活动总结模板
/String constant
其他英文怎么说string ls_const_CC_number[] = {"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"}
string ls_const_CC_Unit[] = {"", "拾", "佰", "仟","万","拾","佰","仟","亿","拾","佰","仟"}
string ls_yuan = "元", ls_jiao = "⾓", ls_fen = "分", ls_negtive = "负"
//Convert the input real value to string
ls_input = string(abs(ar_amount), "0.00")
li_strlen = len(ls_input)
//Generate Integer part
ls_result = ls_yuan
li_count = 0
FOR li_cursor = li_strlen - 3 TO 1 STEP -1
li_count = li_count + 1
ls_digit = mid(ls_input, li_cursor, 1)
//Get the index of the table number
li_digit = Integer(ls_digit)
ls_result = ls_const_CC_number[li_digit + 1] + &酱焖黄花鱼
老年人市场ls_const_CC_Unit[li_count] + ls_result
NEXT
If double(mid(ls_input,li_strlen -2,2)) = 0 then
血光之灾是什么意思
ls_result = ls_result + '整'
El
击鼓传花音乐ls_digit = mid(ls_input, li_strlen - 1, 1)
关于家的作文
li_digit = Integer(ls_digit)
ls_result = ls_result + ls_const_CC_number[li_digit + 1] + ls_jiao
ls_digit = mid(ls_input, li_strlen , 1)
li_digit = Integer(ls_digit)
ls_result = ls_result + ls_const_CC_number[li_digit + 1] + ls_fen
End if
IF ar_amount < 0 THEN
ls_result = ls_negtive + ls_result
END IF
RETURN ls_result

本文发布于:2023-05-14 01:35:50,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/89/895100.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:民币   活动   音乐   返回值   老年人
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图