Documentation
Back to website >

CIN (Pascalscript)

Description

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).

Syntax

function CIN(ABI, CAB, CONTO: String; var IBAN : String): String;

Arguments

The calculated CIN is a single letter. ABI and 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 CIN, the IBAN is also determined from these values and returned. IBAN is always prerandom and consists of CIN+ABI+CAB+CONTO.

Example

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"