BigInteger Error with POWER(2,63)

GregorDGregorD Member Posts: 26
Hi,

i have a variable bigInt wit DataType "BigInteger".
This is my code:

bigInt := POWER(2,63);

I get the Error Message "There is a integer, that is too large" 9.223......

But When I write the following, i get the same number, but no Error...
MESSAGE(FORMAT(POWER(2,63)));

Why does my bigInt variable not work??

Comments

  • BBlueBBlue Member Posts: 90
    You get the error because it cannot assignt such a large numer in BigInt Type. Try using decimal. When you display a message, you don't get any error because you don't make an assignment, as in the first case, you just display a mesage.
    //Bogdan
  • Palle_Due_Larsen_[MFST]Palle_Due_Larsen_[MFST] Member, Microsoft Employee Posts: 3
    2^63 is too large for a BigInteger. The range is -(2^63) to (2^63)-1.

    There is, however, a known bug that applies a different range, when used in codeunits. You should be OK to uses the aforementioned range when it comes to tables.

    Best regards
    Palle Due Larsen, Microsoft NAV
    This posting is provided "AS IS" with no warranties, and confers no rights
Sign In or Register to comment.