逆向编程将可以了呀
数组变量 CH 是模块级数组变量。
程序代码:
Dim CH Private Sub Command1_Click() Dim Strx As String, chx As String, I As Integer For I = 1 To Len(Text1.Text) chx = Mid(Text1.Text, I, 1) Strx = Strx & CH(Val(chx)) Next I Text2.Text = Strx End Sub Private Sub Command2_Click() Dim Strx As String, chx As String, I As Integer, J As Integer For I = 1 To Len(Text2.Text) chx = Mid(Text2.Text, I, 1) '得到单个字符 For J = 0 To 9 If chx = CH(J) Then '历遍数组 CH 判断是哪个字符。 Strx = Strx & J '检测当前字符在数组中的位置。 End If Next J Next I Text3.Text = Strx End Sub Private Sub Form_Load() CH = Array("n", "p", "m", "x", "b", "t", "s", "g", "e", "w") End Sub
数组变量 CH 是模块级数组变量。
请不要选我!!!