HangulCommonConstants
constants are defined here: The Unicode Standard, chapter 3 Conformance, section 3.12
| Name | Type | Comment | Kind |
|---|---|---|---|
| S_BASE | UnicodeCodePoint | start of hangul syllables unicode block | constant |
| L_BASE | UnicodeCodePoint | start of jamo choseong unicdoe block | constant |
| V_BASE | UnicodeCodePoint | start of jamo jungseong unicode block (without 1160;HANGUL JUNGSEONG FILLER) | constant |
| T_BASE | UnicodeCodePoint | one less than the beginning of the range of trailing consonants, which starts at U+11A8 | constant |
| L_COUNT | DWORD | - | constant |
| V_COUNT | DWORD | - | constant |
| T_COUNT | DWORD | one more than the number of trailing consonants relevant to the decomposition algorithm: (11C2 - 11A8 + 1) + 1 | constant |
| N_COUNT | DWORD | 588, the number of precomposed Hangul syllables starting with the same leading consonant, counting both the LV_Syllables and the LVT_Syllables for each possible trailing consonan | constant |
| S_COUNT | DWORD | 11172, total number of precomposed Hangul syllables | constant |
Code
Declaration
{attribute 'qualified_only'}
VAR_GLOBAL INTERNAL CONSTANT
(* start of hangul syllables unicode block *)
S_BASE :UnicodeCodePoint := 16#AC00;
(* start of jamo choseong unicdoe block *)
L_BASE :UnicodeCodePoint := 16#1100;
(* start of jamo jungseong unicode block (without 1160;HANGUL JUNGSEONG FILLER) *)
V_BASE :UnicodeCodePoint := 16#1161;
(* one less than the beginning of the range of trailing consonants, which starts at U+11A8 *)
T_BASE :UnicodeCodePoint := 16#11A7;
L_COUNT :DWORD := 19;
V_COUNT :DWORD := 21;
(* one more than the number of trailing consonants relevant
to the decomposition algorithm: (11C2 - 11A8 + 1) + 1 *)
T_COUNT :DWORD := 28;
(* 588, the number of precomposed Hangul syllables starting with the same leading consonant,
counting both the LV_Syllables and the LVT_Syllables for each possible trailing consonan *)
N_COUNT :DWORD := V_COUNT*T_COUNT;
(* 11172, total number of precomposed Hangul syllables*)
S_COUNT :DWORD := L_COUNT*N_COUNT;
END_VAR