anchor.diff:  
   uses
     mMathUtility;
  +
  +resourcestring
  +  SErrorWrongLength = 'Wrong length. Must be 11 characters.';
  +  SErrorWrongOwnerCode = 'Owner code must be composed by 3 letters.';
  +  SErrorWrongCategoryIdentifier ='Wrong category identifier. Must be U or J or Z.';
  +  SErrorWrongSerialNumber = 'Only digits are allowed in serial number.';
  +  SErrorCheckDigitNotANumber = 'Check digit is not a digit.';
  +  SErrorWrongCheckDigit = 'Wrong check digit. It should be: ';
  +
   
   // http://www.gvct.co.uk/2011/09/how-is-the-check-digit-of-a-container-calculated/
   // https://en.wikipedia.org/wiki/ISO_6346
  
positive.code:   CategoryIdentifier:= Copy(aContainerCode, 4, 1);
    if (CategoryIdentifier <> 'U') and (CategoryIdentifier <> 'J') and (CategoryIdentifier <> 'Z') then
    begin
      aErrorMessage:= 'Wrong category identifier. Must be U or J or Z.';
      exit;
    end;
  
    SerialNumberStr:= Copy(aContainerCode, 5, 6);
    if not IsNumeric(SerialNumberStr, false) then
    begin
      aErrorMessage:= 'Only digits are allowed in serial number.';
      exit;
    end;
  
    CheckDigitStr:= Copy(aContainerCode, 11, 1);
    if not IsNumeric(CheckDigitStr, false) then
    begin
      aErrorMessage:= 'Check digit is not a digit.';
      exit;
    end;
  
    GoodCheckDigit:= CalculateContainerCheckDigit(aContainerCode);
    if StrToInt(CheckDigitStr) <> GoodCheckDigit then
    begin
      aErrorMessage:= 'Wrong check digit. It should be ' + IntToStr(GoodCheckDigit) + '.';
      exit;
    end;
  
  
negative.code:   begin
      if (OwnerCode[i] <= 'A') or (OwnerCode[i] >= 'Z') then
      begin
        aErrorMessage:= SErrorWrongOwnerCode;
        exit;
      end;
    end;
  