人民币大写

来源:互联网 发布:oracle数据库查询工具 编辑:程序博客网 时间:2024/05/16 02:06
const Len:Integer = 10 ; cNum: WideString = '零壹贰叁肆伍陆柒捌玖'; function NumToChar(const n: Double): string; var i : Integer; sNum,sTemp : WideString; begin result :=''; sNum := format('%'+inttostr(Len)+'d',[round(n * 100)]); for i := 0 to Len-1 do begin stemp := copy(snum,i+1,1); if stemp=' ' then continue else Result := Result + cNum[strtoint(stemp)+1]; end; end;
原创粉丝点击