All pastes #406187 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-03-22 05:21 UTC
rendered paste body
   End If
   If Len(Text1.Text) < 4 Then Text2.Text = "": Exit Sub
   CL = 0
   For C = 4 To Len(Text1.Text)
      Valore = Asc(Mid$(Text1.Text, C, 1)) * MyTable(CL)
      FirstPart = FirstPart + Valore
      CL = CL + 1
      If CL > &H26 Then CL = 0
   Next
   CL = 0: Valore = 0
   For C = 4 To Len(Text1.Text)
      Valore = Asc(Mid$(Text1.Text, C - 1, 1)) * Asc(Mid$(Text1.Text, C, 1))
      SecondPart = SecondPart + Valore * MyTable(CL)
      CL = CL + 1
      If CL > &H26 Then CL = 0
   Next
   Text2.Text = LTrim$(Str$(FirstPart)) + "-" + LTrim$(Str$(SecondPart))
 End Sub