GAMicrosUser
MIS
Hi Micros experts,
I am working on a SIM that converts a long string into a base 32 format. Part of the formatting process is to take the modulus (%) of a numeric string. Everything works fine as long as the numeric string stays at or under 18 characters. If I try to take the modulus of a 19 character numeric string, it returns an invalid negative value.
For example, the following calculation (999931207132112226 % 32) = 2 which is correct.
If I increase the length of the numeric string by 1, the following calulation occurs:
(9999312071311124223 % 32) = 1- Which is of course incorrect.
I have tried so many different things in troubleshooting this issue, I dont think it is a logic/syntax issue in my code. I think it may just be a limtation of the data type.
Does anyone have any insight into what may be going on? Is 18 characters the limit of the mathematical calculation? Any assistance would be greatly appreciated.
Regards
I am working on a SIM that converts a long string into a base 32 format. Part of the formatting process is to take the modulus (%) of a numeric string. Everything works fine as long as the numeric string stays at or under 18 characters. If I try to take the modulus of a 19 character numeric string, it returns an invalid negative value.
For example, the following calculation (999931207132112226 % 32) = 2 which is correct.
If I increase the length of the numeric string by 1, the following calulation occurs:
(9999312071311124223 % 32) = 1- Which is of course incorrect.
I have tried so many different things in troubleshooting this issue, I dont think it is a logic/syntax issue in my code. I think it may just be a limtation of the data type.
Does anyone have any insight into what may be going on? Is 18 characters the limit of the mathematical calculation? Any assistance would be greatly appreciated.
Regards