DELPHI盒子
!实时搜索: 盒子论坛 | 注册用户 | 修改信息 | 退出
检举帖 | 全文检索 | 关闭广告 | 捐赠
技术论坛
 用户名
 密  码
自动登陆(30天有效)
忘了密码
≡技术区≡
DELPHI技术
lazarus/fpc/Free Pascal
移动应用开发
Web应用开发
数据库专区
报表专区
网络通讯
开源项目
论坛精华贴
≡发布区≡
发布代码
发布控件
文档资料
经典工具
≡事务区≡
网站意见
盒子之家
招聘应聘
信息交换
论坛信息
最新加入: deliping
今日帖子: 2
在线用户: 1
导航: 论坛 -> 开源项目 斑竹:joki,ralf_jones  
作者:
男 joki (joki) ★☆☆☆☆ -
盒子活跃会员
2004/3/20 11:20:23
标题:
最新工作安排 浏览:4292
加入我的收藏
楼主: 1.应用程序工具单元征集(Application Utils):
  详细内容请查阅此贴
  http://bbs.2ccc.com/topic.asp?topicid=71060
2.测试SmallStruct数据模块
  详细内容请查阅此贴
  http://bbs.2ccc.com/topic.asp?topicid=73216

----------------------------------------------------------------------
                                                   开源项目框架开发组
                                                           joki  敬上
----------------------------------------------
代码世界不仅仅只有键盘的声响,还有我们热切的心!
有我们共同的世界和共同的目标,也是程序员的目标!
作者:
男 joki (joki) ★☆☆☆☆ -
盒子活跃会员
2004/4/21 11:01:55
1楼: function SmallToBig(Mon:Real):string;    //小写金额转为大写金额
function SmallToBig(Mon:Real):string;
var
  Qianwei,Dotpos,i,j: integer;
  Small,Wei1,Qianwei1: string;
  stail : string;
  ZeroNumber: integer;
begin
  Result := '';
  small:=FormatFloat('0.00',Mon);
  DotPos:=pos('.',small);
  for j:=length(small) downto 1 do begin
    if j<>dotpos then begin
      if StrToint(copy(small,j,1))<>0 then
        Break;
    end;
  end;

  qianwei := length(small)-j-3;
  if qianwei<0 then qianwei := qianwei +1;
  if qianwei>4 then
    Stail := '万'
  else if (qianwei>0)and (qianwei<=4) then
    Stail := ''
  else
    Stail := '';
  ZeroNumber := 0;
  for i:=j downto 1 do begin
    if i<>dotpos then begin
      if (ZeroNumber >0) and (StrToInt(copy(small,i,1))=0) then
        inc(qianwei)
      else begin
        case StrToInt(copy(small,i,1)) of
          1:wei1:='壹'; 2:wei1:='贰';
          3:wei1:='叁'; 4:wei1:='肆';
          5:wei1:='伍'; 6:wei1:='陆';
          7:wei1:='柒'; 8:wei1:='捌';
          9:wei1:='玖'; 0:wei1:='零';
        end;
        if wei1<>'零' then begin
          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;
        end else qianwei1 :='';
        inc(qianwei);
        Result:=wei1+qianwei1+Result;
        if strtoint(copy(small,i,1))=0 then
          ZeroNumber := ZeroNumber +1
        else
          ZeroNumber := 0;
      end;
    end;
  end;
  Result := Result + Stail;
end;
----------------------------------------------
代码世界不仅仅只有键盘的声响,还有我们热切的心!
有我们共同的世界和共同的目标,也是程序员的目标!
作者:
男 register (隐神) ★☆☆☆☆ -
盒子活跃会员
2004/5/3 8:22:40
2楼: //汉字-拼音缩写 [mode = 1] Upper(),[Mode = 2] Lowwer()
function GetPinYin(sHZ: string;mode: integer = 1): string;
var
  i: Integer;
  PY: string;
  s: string;
  function GetPYIndexChar(hzchar: string): char;
  begin
    case WORD(hzchar[1]) shl 8 + WORD(hzchar[2]) of
      $B0A1..$B0C4: result := 'a';
      $B0C5..$B2C0: result := 'b';
      $B2C1..$B4ED: result := 'c';
      $B4EE..$B6E9: result := 'd';
      $B6EA..$B7A1: result := 'e';
      $B7A2..$B8C0: result := 'f';
      $B8C1..$B9FD: result := 'g';
      $B9FE..$BBF6: result := 'h';
      $BBF7..$BFA5: result := 'j';
      $BFA6..$C0AB: result := 'k';
      $C0AC..$C2E7: result := 'l';
      $C2E8..$C4C2: result := 'm';
      $C4C3..$C5B5: result := 'n';
      $C5B6..$C5BD: result := 'o';
      $C5BE..$C6D9: result := 'p';
      $C6DA..$C8BA: result := 'q';
      $C8BB..$C8F5: result := 'r';
      $C8F6..$CBF9: result := 's';
      $CBFA..$CDD9: result := 't';
      $CDDA..$CEF3: result := 'w';
      $CEF4..$D188: result := 'x';
      $D1B9..$D4D0: result := 'y';
      $D4D1..$D7F9: result := 'z';
    else
      result := char(32);
    end;
  end;
begin
  s := '';
  i := 1;
  while i <= Length(sHZ) do
  begin
    PY := Copy(sHZ, i, 1);
    if PY >= Chr(128) then
    begin
      Inc(i);
      PY := PY + Copy(sHZ, i, 1);
      s := s + GetPYIndexChar(PY);
    end
    else
      s := s + PY;
    Inc(i);
  end;
  case mode of
  1: result := UpperCase(s);
  2: result := LowerCase(s);
  else
    result := s;
  end; //case
end;
----------------------------------------------
按此在新窗口浏览图片
作者:
男 cmh (cmh) ★☆☆☆☆ -
盒子活跃会员
2004/6/3 11:09:10
3楼: to:joki (joki)  
你能不能写一个阿拉伯数字转换成英文的
例如:
  116转换成 one hundred and sixteen;
  29转换成twenty-nine;
我不懂.

----------------------------------------------
-
信息
登陆以后才能回复
Copyright © 2CCC.Com 盒子论坛 v3.0.1 版权所有 页面执行68.35938毫秒 RSS