Table of Content
HAL Forum
function string UChr (
integer CharCode)
Description:
Returns an Unicode character that corresponds to the numerical code defined with CharCode.
Parameters:
CharCode Numerical code of the Unicode character.
global
procedure FinRefChecksum1(var string ref)
BEGIN
  Integer i;
  Integer sm,s1;
  
  s1 = 0;
  for (i=(len(ref)-1);i>=0;i=i-1) begin
    switch (Mod(((len(ref)-1)-i),3)) begin
      case 0: sm = 7;
      case 1: sm = 3;
      otherwise sm = 1;
    end;
    s1 = s1 + sm*(asc(Mid(ref,i,1))-48);
  end;
  sm =  Mod(10 - Mod(s1,10),10);
  ref = ref & uchr(sm+48);
  RETURN;
END;

Related topics:
««