The solution:
Barcode = CLIP(LEFT(BarcodeString)) !209089200350
L = 12
!*******************Controlegetal berekenen
Som# = 0
J# = 0
LOOP I# = L TO 1 BY -1
J# += 1
IF (J# % 2)
Co# = 3
ELSE
Co# = 1
END
Som# += (Barcode[I#] * Co#)
END
Digit = (10 - (Som# % 10)) %10
Chaine = CLIP(Barcode) & Digit !2090892003508
!*********************tekst voor afdruk barcode berekenen
first# = barcode[1]
loop i# = 3 To 7
tableA# = 0
Case i#
of 3
Case first#
of 0 orof 1 orof 2 orof 3
tableA# = True
End
of 4
Case first#
of 0 orof 4 orof 7 orof 8
tableA# = True
End
of 5
Case first#
of 0 orof 1 orof 4 orof 5 orof 9
tableA# = True
End
of 6
Case first#
of 0 orof 2 orof 5 orof 6 orof 7
tableA# = True
End
of 7
Case first#
of 0 orof 3 orof 6 orof 8 orof 9
tableA# = True
End
End
If tableA# Then
CodeBarre = CodeBarre & Chr(65 + chaine[i#])
Else
CodeBarre = CodeBarre & Chr(75 + chaine[i#])
End
.
CodeBarre = CodeBarre & '*' !Add middle separator
loop i# = 8 To 13
CodeBarre = CodeBarre & Chr(97 + chaine[i#])
.
CodeBarre = CodeBarre & '+' !Add end mark
return(CodeBarre)