Documentation
Back to website >

Modulo11 (Pascalscript)

Description

Modulo11 forms the check digit according to the Modulo11 method.

Syntax

function Modulo11(const S: String): Integer;

Arguments

Modulo11 forms a check digit according to the Modulo11 method. S contains the string whose check digit is to be formed. Modulo11 is especially used by banks to create machine-readable documents.

Example

var
  S1: String;
  i : Integer;
  S2: String;
begin
  S1:='1234';
  i:=Modulo11(S1);
  S2:=IntToStr(i);
  ShowMessage(S2);
end;

Rules to understand the script can be found here.

The text'1234' is assigned to the string variable S1. Via the function Modulo11 the check digit is formed and assigned to the variable i. IntToStr converts the integer value i into a displayable text S2.

ShowMessage shows: 3