Zum Hauptinhalt gehen

Suche

Suche

Vb Script Required For Mod10 Check Digit Calculation

Kommentare

1 Kommentar

  • Avatar
    Legacy Poster

    I had a go at it myself and it looks like it works but there is more than likely a cleaner way to do it.

     

    C1 = Mid((Data), 1, 1)* Mid((Weight), 1, 1)

    C2 = Mid((Data), 2, 1)* Mid((Weight), 2, 1)

    C3 = Mid((Data), 3, 1)* Mid((Weight), 3, 1)

    C4 = Mid((Data), 4, 1)* Mid((Weight), 4, 1)

    C5 = Mid((Data), 5, 1)* Mid((Weight), 5, 1)

    C6 = Mid((Data), 6, 1)* Mid((Weight), 6, 1)

    Total = C1 + C2 + C3 + C4 + C5 + C6

    Value = Right(Total, 1)

    0

Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.