Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[7246] [해결] 금액을 한글문자열로...
믿음127 [ ] 761 읽음    2000-07-08 21:18

var
temp:integer;
i:integer;
leng:integer;
temp_jari:integer;
begin
    leng:=length(edit1.text);
    for i:=1 to leng do
     begin
       temp_jari:=leng-i;
       temp:=strtoint(copy(Edit1.text,i,1));
       if leng<>4 then
          begin
             if temp_jari =3 then
              edit2.text:=form1.edit2.Text+'만';
          end;
       if leng<>8 then
          begin
             if temp_jari =7 the
              edit2.text:= edit2.Text+'억';
          end;
       if temp <> 0 then
         begin
              edit2.text:= edit2.Text+ han(temp)+jari(temp_jari) ;
         end
       else
         begin
              edit2.text:= edit2.Text +han(temp) ;
         end;
     end;
        edit2.text:= edit2.Text+'원';
  end;
function jari(temp_jari:integer):string;
begin
  case temp_jari of
   0:jari:='';
   1:jari:='십';
   2:jari:='백';
   3:jari:='천';
   4:jari:='';
   5:jari:='십';
   6:jari:='백';
   7:jari:='천';
   8:jari:='';
   9:jari:='십' ;
   10:jari:='백';
   11:jari:='천';
  end;
end;
function han(temp:integer):string;
begin
   case temp of
     1:han:='일';
     2:han:='이';
     3:han:='삼';
     4:han:='사';
     5:han:='오';
     6:han:='육';
     7:han:='칠';
     8:han:='팔';
     9:han:='구';
   else
     han:='';
   end;
end;


+ -

관련 글 리스트
7246 [해결] 금액을 한글문자열로... 믿음127 761 2000/07/08
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.