|
Returns the length of the given string. Note that this function is mostly for measuring the length of string that contain text. Use BytesInString if the string contains raw data. |
|
TargetString |
The string being measured for length. |
|
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;
««