Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.
Random Not Returning a number?
I was playing with SRP_Math("Random", e.g., Result = SRP_Math('RANDOM', 1, 6000). It returns a number, but OI doesn't think so. For example, Result = 2814.258660440446841, however, when I pass Result to the Int function. It tells me that it's not a numeric Int( Result) . Also, when I test Result with Num function, it also comes back that Int( Result) isn't a number. However, if I explicitly type in the number into the Int function, it works. Any ideas?
Comments
I can only assume that OI is having trouble with long floating point decimals or perhaps the number is being converted to scientific notation and this is causing issues. My suggestion is to try using the SRP_Math INT service or set the DecimalPlaces argument in the RANDOM service to be 0.
That worked great. OI must have a problem with long floating point numbers.
Thanks for the suggestions. They worked!
It's fairly well known that OI does have floating point number limits (16-digits) due to the 32-bit architecture. That's why we created SRP_Math. I was speculating that the random number you got was too long for OI's native statements and I think your further testing showed that to be the case.
Thanks for the SRP_Utility. I have found some very useful things within and has really helped. Also, as always, appreciate your prompt replies and expertise.
Have a great day in cool Oregon.