Skip to content

Commit 34333cc

Browse files
committed
Add remarks for MapSample.
1 parent e88eaec commit 34333cc

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

samples/Berrysoft.Data.MapSample/Program.vb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,25 @@
1616
dictionary.Add("潮"c, "chao")
1717
dictionary.Add("常"c, "chang")
1818

19+
'This is a famous Chinese couplet of Temple of Lady Meng Jiangnu in Shanhaiguan.
20+
'The correct pronunciation of it is:
21+
'Hǎi shuǐ cháo zhāo zhāo cháo zhāo cháo zhāo luò
22+
'海 水 朝 / 朝 朝 朝 / 朝 朝 朝 落
23+
'Fú yún zhǎng cháng cháng zhǎng cháng zhǎng cháng xiāo
24+
'浮 云 长 / 长 长 长 / 长 长 长 消
25+
26+
'朝 means "day" when pronounces zhāo and means "tide" when pronounces cháo. Now the latter meaning is usually written as 潮.
27+
'长 means "grow" when pronounces zhǎng and means "always" when pronounces cháng. Now the latter meaning is usually written as 常.
28+
29+
'This program means to replace the old multi-tone characters to their commonly used forms for easier understanding.
30+
1931
Dim str = "海水朝朝朝朝朝朝朝落浮云长长长长长长长消".ToArray()
2032
Console.WriteLine(str)
2133

2234
For i As Integer = 0 To str.Length - 1
2335
Dim pronounce = dictionary.GetValuesFromKey1(str(i))
2436
If pronounce.Count > 1 Then
37+
Console.Write("{0}" + vbTab, str(i))
2538
For j As Integer = 0 To pronounce.Count - 1
2639
Console.Write("{0} {1}" + vbTab, j, pronounce(j))
2740
Next
@@ -34,6 +47,9 @@
3447
End If
3548
Next
3649

50+
'If you enter the correct number: 0 1 1 0 1 0 1 0 1 1 0 1 0 1
51+
'You will get: 海水潮朝朝潮朝潮朝落浮云长常常长常长常消
52+
'Now it is easier to understand.
3753
Console.WriteLine(str)
3854
End Sub
3955
End Module

0 commit comments

Comments
 (0)