CIN forms a check letter for the Italian banking system. The
CIN (=Codic di controllo) is calculated from the
ABI (=Banca destinataria), the
CAB (=Filiale destinataria) and the
Conto (=Numero conto).
function CIN(ABI, CAB, CONTO: String; var IBAN : String): String;
CIN is a single letter.
CAB are expected to have 5 digits with leading zeros, with missing zeros being added.
Conto is expected to have 12 digits with leading zeros, which may also be completed.
Based on the input values and the calculated
IBAN is also determined from these values and returned.
IBAN is always prerandom and consists of
var ABI : String; CAB : String; CONTO : String; CIN_RESULT : String; IBAN : String; i : Integer; S2 : String; begin ABI:='3440'; CAB:='50520'; CONTO:='333200'; CIN_RESULT:=CIN(ABI, CAB, CONTO, IBAN); ShowMessage(CIN_RESULT+' - '+IBAN); end;
Rules to understand the script can be found here.
ShowMessage shows:"F - F034405052000000000333200"