초성, 중성, 종성의 상수테이블 정의
const 초성: array[0..18] ofWideString =
('ㄱ','ㄲ','ㄴ','ㄷ','ㄸ','ㄹ','ㅁ','ㅂ','ㅃ','ㅅ',
'ㅆ','ㅇ','ㅈ','ㅉ','ㅊ','ㅋ','ㅌ','ㅍ','ㅎ');
중성: array[0..20] ofWideString =
('ㅏ','ㅐ','ㅑ','ㅒ','ㅓ','ㅔ','ㅕ','ㅖ','ㅗ','ㅘ',
'ㅙ','ㅚ','ㅛ','ㅜ','ㅝ','ㅞ','ㅟ','ㅠ','ㅡ','ㅢ',
'ㅣ');
종성: array[0..27] ofWideString =
('','ㄱ','ㄲ','ㄳ','ㄴ','ㄵ','ㄶ','ㄷ','ㄹ','ㄺ','ㄻ',
'ㄼ','ㄽ','ㄾ','ㄿ','ㅀ','ㅁ','ㅂ','ㅄ','ㅅ','ㅆ',
'ㅇ','ㅈ','ㅊ','ㅋ','ㅌ','ㅍ','ㅎ');
TMemo 에 전부 출력해봄.
procedureTForm1.Button1Click(Sender: TObject);
var pwc: PWideChar;
i, j, k: Integer;
count: Integer;
begin
pwc:=GlobalAllocPtr(GHND, 4);
count:=0;
try
fori:=0toHigh(초성) do begin forj:=0toHigh(중성) do begin
fork:=0toHigh(종성) 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;
댓글 없음:
댓글 쓰기