( |
|
|
|||
Returns the modulus (the division leftover) of the specified numbers. |
Parameters: | |
The number that we are dividing. | |
The number that we are dividing with. | |
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: |