📄 函数介绍.txt
字号:
一、DecimalToChinese(Number:decimal;Cntype:integer):string;
<数字转换汉字大写的函数一>
<参数介绍>:Number:源数字,Decimal类型
CnType:integer类型。
选择转换方式---0:转换为人民币大写
1:转换为汉字读法拼写
例如:decimaltocn(45092034.541,0)='肆仟伍佰零玖万贰仟零叁拾肆元伍角肆分
decimaltocn(45092034.541,1)='肆仟伍佰零玖万贰仟零叁拾肆点伍肆壹
----------------------------------------------------------------------------
二、DecimalToChineseExt(Number:string;Cntype:integer):string;
<数字转换汉字大写的函数二>
<参数介绍>:Number:源数字,String类型
CnType:同上;
注意:本函数为上函数的变形,参数number无精度限制,可以任意长度
转换为人民币大写时,如果小数位数超过两位,程序会执行四舍五入保留两位数后再转换,
无需再手动转换。
----------------------------------------------------------------------------
三、DecimalToEnglish(num:Decimal;Cntype:integer):string;
<数字转换英文大写的函数一>
<参数介绍>:Num:源数字,decimal类型
CnType:选择转换方式--0:转换为普通格式
在这里,普通格式的最大数字单位是Million(百万);
1:转换为美语格式(AmericaEnglish)
美语格式的十亿为Billion,万亿为Trillion;
2:转换为英语格式(BritishEnglish)
英语格式的十亿为Milliard,万亿为Billion,百亿亿为Trillion。
例如:DecimalToEnglish(479831566025.569,0)='Four Hundred and Seventy Nine Thousand
Eight Hundred and Thirty One Million,
Five Hundred and Sixty Six Thousand
and Twenty Five point Five Six Nine';
DecimalToEnglish(479831566025.569,1)='Four Hundred and Seventy Nine Billion,
Eight Hundred and Thirty One Million,
Five Hundred and Sixty Six Thousand
and Twenty Five point Five Six Nine';
DecimalToEnglish(479831566025.569,2)='Four Hundred and Seventy Nine milliard,
Eight Hundred and Thirty One Million,
Five Hundred and Sixty Six Thousand
and Twenty Five point Five Six Nine';
----------------------------------------------------------------------------
四、DecimalToEnglishExt(num:string;cntype:integer):string;
<数字转换英文大写的函数二>
<参数介绍>:Num:源数字,String类型
CnType:同上
注意:本函数为上面函数的变形,输入参数num的精度无限制。
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -