Integer type

LABLAB Member Posts: 2
Hello.

It seems that, in Navision, variables with int type range from 2^-31+1 to 2^31-1. This means that there are exactly 2^32-1 differente possible values. I'd like to use a variable with exactly 2^32 different possible values so that I can build an array of 32 ints to write a number with up to 1024 bits and then perform some math calculation over it, using appropriate functions created for the effect.

Question: Is there any way to allow Navision to consider an int type ranging from -2^31 to 2^31-1 or from -2^31-1 to 2^31 or even (unsigned type) from 0 to 2^32-1?

(note: the same question is valid for biginteger type with 64 bits)

Thanks in advance for any answer
Regards

Comments

  • nunomaianunomaia Member Posts: 1,153
    No, you can't.
    If you want to store those values you must use BigInteger. You can also do it in an external component (COM object, .NET) or handle it has text string (gives a lot of work)
    Nuno Maia

    Freelance Dynamics AX
    Blog : http://axnmaia.wordpress.com/
  • kinekine Member Posts: 12,562
    Or you can use DECIMAL and just round it when needed...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.