function SmallTOBig(small:real):string;
var SmallMonth,BigMonth:string;
wei1,qianwei1:string[2];
wei,qianwei,dianweizhi,qian:integer;
begin
qianwei:=-2;
Smallmonth:=formatfloat('0.00',small);
dianweizhi :=pos('.',Smallmonth);
for qian:=length(Smallmonth) downto 1 do
begin
if qian<>dianweizhi then
begin
case strtoint(copy(Smallmonth,qian,1)) of
1:wei1:='壹'; 2:wei1:='贰';
3:wei1:='叁'; 4:wei1:='肆';
5:wei1:='伍'; 6:wei1:='陆';
7:wei1:='柒'; 8:wei1:='捌';
9:wei1:='玖'; 0:wei1:='零';
end;
case qianwei of
-3:qianwei1:='厘';
-2:qianwei1:='分';
-1:qianwei1:='角';
0 :qianwei1:='元';
1 :qianwei1:='拾';
2 :qianwei1:='佰';
3 :qianwei1:='千';
4 :qianwei1:='万';
5 :qianwei1:='拾';
6 :qianwei1:='佰';
7 :qianwei1:='千';
8 :qianwei1:='亿';
9 :qianwei1:='十';
10:qianwei1:='佰';
11:qianwei1:='千';
end;
inc(qianwei);
BigMonth :=wei1+qianwei1+BigMonth;
end;
end;
SmallTOBig:=BigMonth;
end;
var SmallMonth,BigMonth:string;
wei1,qianwei1:string[2];
wei,qianwei,dianweizhi,qian:integer;
begin
qianwei:=-2;
Smallmonth:=formatfloat('0.00',small);
dianweizhi :=pos('.',Smallmonth);
for qian:=length(Smallmonth) downto 1 do
begin
if qian<>dianweizhi then
begin
case strtoint(copy(Smallmonth,qian,1)) of
1:wei1:='壹'; 2:wei1:='贰';
3:wei1:='叁'; 4:wei1:='肆';
5:wei1:='伍'; 6:wei1:='陆';
7:wei1:='柒'; 8:wei1:='捌';
9:wei1:='玖'; 0:wei1:='零';
end;
case qianwei of
-3:qianwei1:='厘';
-2:qianwei1:='分';
-1:qianwei1:='角';
0 :qianwei1:='元';
1 :qianwei1:='拾';
2 :qianwei1:='佰';
3 :qianwei1:='千';
4 :qianwei1:='万';
5 :qianwei1:='拾';
6 :qianwei1:='佰';
7 :qianwei1:='千';
8 :qianwei1:='亿';
9 :qianwei1:='十';
10:qianwei1:='佰';
11:qianwei1:='千';
end;
inc(qianwei);
BigMonth :=wei1+qianwei1+BigMonth;
end;
end;
SmallTOBig:=BigMonth;
end;
解决方案 »
- delphi incompatible types:'integer'and'longbool'
- VCL组件的图标都放在哪里的?*.bpl里没有?
- sql explorer中的enter sql为何不能输入语句了?
- 大家过来帮帮我看看这个程序怎么做?? 有没有程序或例子??需要学点什么东西??
- 窗体继承
- 四参数方程 y=(a-d)/(1+(x/c)^b)+d 求解的算法
- 将fsMDIChild类型窗体设为windowstate设为最大化,怎么出来的时候会有一个最大化过程?
- 呼叫排队的问题,急盼各位大虾的援手!
- 举例说明什么是“计算字段”,它有哪些优缺点?
- 怎样取得ADOQuery的计算字段的值的和呀?
- 在Delphi中,怎么让程序运行时,不让用户进行拷屏操作?
- 请教关于ADO问题
满)自己写一个,不为别的,自己锻炼锻炼好,不要太依赖于别人。