0

I am new to coldfusion. How can I set 32 digit number to variable and use for further calculation. I tried as

<cfscript>
randStart = 1;
randEnd=99999999999999999999999999999999;
ranValue = #randRange(randStart, randEnd, "SHA1PRNG")# ;
</cfscript>

But it throws an error as

Cannot convert the value 1.0E32 to an integer because it cannot fit inside an integer.

Please suggest.

Miguel-F
  • 13,450
  • 6
  • 38
  • 63
Prak
  • 815
  • 7
  • 18
  • "set 32 digit number to variable and use for ...." You can't use it with that function. It's too big for [RandRange()](https://helpx.adobe.com/coldfusion/cfml-reference/coldfusion-functions/functions-m-r/randrange.html). Per the documentation, randRange() only accepts integers: "*Integer numbers. If the numbers are not in the range -2,147,483,648 - 2,147,483,647, ColdFusion generates an error.*" – SOS Sep 06 '18 at 15:10
  • I would also take a look at whether you actually need a number that large? There are other implications to using very large numbers. – Shawn Sep 07 '18 at 16:50

0 Answers0