Not sure whether to post this in this thread or the other, but in any case, here is a routine that adds arbitrarily large positive numbers in any LC-valid base -- 2 - 36. For the checksum problem, it would be fairly simple to convert all the values to 64-bits and use this to add them, either taking char -64 to -1 at the end, or along the way.
I haven't tested thoroughly: function bigPlusBase X,Y,B -- returns X+Y in base B -- X and Y can be any length postitive integers in base B -- B is any valid LC base -- 2 through 36 put "0000000" before X put "0000000" before Y put length(X) into LX put length(Y) into LY repeat add baseConvert(char LX - 5 to LX of X,B,10) + baseConvert(char LY - 5 to LY of Y,B,10) to S put baseConvert(S,10,B) into S put char -6 to -1 of ("0000000" & S) before R delete char -6 to -1 of S if S is not empty then put baseConvert(S,B,10) into S put max(6,LX - 6) into LX put max(6,LY - 6) into LY if LX = 6 and LY = 6 then exit repeat end repeat repeat with i = 1 to 8 if char i of R is not "0" then return char i to -1 of R end repeat end bigPlusBase _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode