Private Function overpunchDec(def As String) As Decimal
Dim Intvalint As Decimal
Dim strval
Dim strvalreal
Dim strover = def.Trim().Substring((Len(def) - 1), 1)
strvalreal = def.Trim().Substring(0, (Len(def) - 1))
Dim strovernum As String
'Dim strsignI As Decimal = 1 / 100
'Dim strsignD As Decimal = -1 / 100
Dim strsign As Decimal
''decimal
Select Case strover
Case "{"
strovernum = "0"
strsign = 1 / 100
Case "A"
strovernum = "1"
strsign = 1 / 100
Case "B"
strovernum = "2"
strsign = 1 / 100
Case "C"
strovernum = "3"
strsign = 1 / 100
Case "D"
strovernum = "4"
strsign = 1 / 100
Case "E"
strovernum = "5"
strsign = 1 / 100
Case "F"
strovernum = "6"
strsign = 1 / 100
Case "G"
strovernum = "7"
strsign = 1 / 100
Case "H"
strovernum = "8"
strsign = 1 / 100
Case "I"
strovernum = "9"
strsign = 1 / 100
Case "}"
strovernum = "0"
strsign = -1 / 100
Case "J"
strovernum = "1"
strsign = -1 / 100
Case "K"
strovernum = "2"
strsign = -1 / 100
Case "L"
strovernum = "3"
strsign = -1 / 100
Case "M"
strovernum = "4"
strsign = -1 / 100
Case "N"
strovernum = "5"
strsign = -1 / 100
Case "0"
strovernum = "6"
strsign = -1 / 100
Case "P"
strovernum = "7"
strsign = -1 / 100
Case "N"
strovernum = "8"
strsign = -1 / 100
Case "N"
strovernum = "9"
strsign = -1 / 100
End Select
strval = strvalreal & strovernum
Intvalint = Convert.ToInt32(strval) * strsign
Return Intvalint
End Function