초성, 중성, 종성의 상수테이블 정의

 

const  초성: array [0..18] of WideString =
   ('ㄱ','ㄲ','ㄴ','ㄷ','ㄸ','ㄹ','ㅁ','ㅂ','ㅃ','ㅅ',
    'ㅆ','ㅇ','ㅈ','ㅉ','ㅊ','ㅋ','ㅌ','ㅍ','ㅎ');

  중성: array [0..20] of WideString =
   ('ㅏ','ㅐ','ㅑ','ㅒ','ㅓ','ㅔ','ㅕ','ㅖ','ㅗ','ㅘ',
    'ㅙ','ㅚ','ㅛ','ㅜ','ㅝ','ㅞ','ㅟ','ㅠ','ㅡ','ㅢ',
    'ㅣ');

  종성: array [0..27] of WideString =
   ('','ㄱ','ㄲ','ㄳ','ㄴ','ㄵ','ㄶ','ㄷ','ㄹ','ㄺ','ㄻ',
    'ㄼ','ㄽ','ㄾ','ㄿ','ㅀ','ㅁ','ㅂ','ㅄ','ㅅ','ㅆ',
    'ㅇ','ㅈ','ㅊ','ㅋ','ㅌ','ㅍ','ㅎ');

 

 

 

 

TMemo 에 전부 출력해봄.

 

procedure TForm1.Button1Click(Sender: TObject);
var  pwc: PWideChar;
  i, j, k: Integer;
  count: Integer;


begin
  pwc:=GlobalAllocPtr(GHND, 4);
  count:=0;
  try
    for i:=0 to High(초성) do begin      for j:=0 to High(중성) do begin
        for k:=0 to High(종성) do begin
          WORD(pwc^):=$AC00 + (i*21*28)+(j*28)+k;
          Memo1.Lines.Add(pwc);
          Inc(count);
        end;
      end;
    end;

    Memo1.Lines.Add('총 '+IntToStr(count));
  finally
    GlobalFreePtr(pwc);
  end;
end;

 

 

총 11172 개.






Posted by bloodguy
,