var/n = rand(1,10000000)
n = num2text(n)
or
var/n = num2text(rand(1,10000000))
But it just gives me a number when printed like
6.28906e+006
instead of.(I think)
6289060
ID:149314
May 26 2002, 10:18 am


How do I convert a number out of scientific notation. I tried using num2text. Like...
var/n = rand(1,10000000) or var/n = num2text(rand(1,10000000))
But it just gives me a number when printed like 6.28906e+006 instead of.(I think) 6289060 
#1 May 26 2002, 11:14 am


There is a second argument for text2num() that lets you set the signifigant digits. For rand(1,10000000) you will probably want to set it to 8. So text2num(n,8) would get rid of that scientific notation for you.

Thank you.
So I would do. var/x = rand(1,10000000) x = text2num(x,8)) x = num2text(x) //assuming I want it in text format. Widh I could have a denotate procedure... built in Making one may be easy though. proc/Denotate(x) //Is there a way to find the size of a number in digits?. s = numbersize(x) return text2num(x,s) 
Exadv1 wrote:
Thank you. It would just be easier to try return text2num( round(x,1), 20) 20 sigfigs ought to work for anything. Note that I round off the number  this gets rid of decimals, which will look very ugly with lots of sigfigs. 
This won't make a number like 1 turn into a number like 10000000. Right?

Exadv1 wrote:
This won't make a number like 1 turn into a number like 10000000. Right? 1 with 20 significant figures is just 1. Any significant figures beyond that which the number actually has are just ignored. =) I.e  if you had a number like 37526000000, that only has 5 sigfigs. The other six zeroes that follow it are just placeholders. Generally, it's almost impossible to reach 20 sigfigs in anything. Heck: 23,456,789,012,345,678,901 That's 20 sigfigs. I doubt you'll be working with sextillions, much less in the 10s of sextillions. =) Note: any number above 4 billion is likely not to be completely accurate, due to rounding error. 