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