|
Post by Rambo-X on Feb 25, 2021 9:54:15 GMT
Hi Guys,
Probably I'm doing something wrong here... I wanted to hold a number larger than 10 digits and the variable integer is failing at that. Which of course should happen considering the case. But I then tried to pull a number larger than 10 digits via String and also Decimal, still failed as it supposed to be.
Is there anyway to get a Number larger than 10 digits to a Variable without directly getting it into the clipboard?
Thank you.
|
|
|
Post by Steve on Feb 26, 2021 5:20:48 GMT
Hi Rambo-X A value outside of -2,147,483,648 to 2,147,483,647 is either too big or too small for an integer in MMM. Under the hood MMM is declaring these as strict 4-byte integer values. It is not possible to do any arithmetic with an integer larger than 2,147,483,647 in MMM regardless of how you get the variable in. Defining a string in MMM to be a larger number than 10 digits and then trying arithmetic will also fail. It depends really on what you are trying to achieve with the value. Do you just need it as a text because strings though can easily take 10 characters so will have no problem holding that 10 digit value.
But I then tried to pull a number larger than 10 digits via String and also Decimal, still failed as it supposed to be. When you say you had trouble pulling the number larger than 10 digits via a string what exactly did you mean?
Is there anyway to get a Number larger than 10 digits to a Variable without directly getting it into the clipboard? A string can take it. But again, it depends what you need it for. Getting values into MMM can come from file, have a look at www.turnssoft.com/conditions.html#inputfromfile.
|
|
|
Post by philranger on Feb 28, 2021 0:46:40 GMT
What do you want to do with that variable? Could it be temporarily truncated for processing then reassembled?
|
|
|
Post by Rambo-X on Mar 1, 2021 4:09:18 GMT
Hello Steve,
Sorry for my late response. Thank God, String Worked. My bad that I had an Integer somewhere in the long code it messed up the entire loop as well as some other minor issues and I misunderstood that String wasn't picking it up.
Sorry for that.
|
|
|
Post by Rambo-X on Mar 1, 2021 4:10:58 GMT
Hi Philranger,
It was just to get to another file and merge it with some other numbers to make a unique code buddy.
Tc.
|
|