Page 1 of 1

exceeding 9,999,999

Posted: Tue Mar 08, 2005 6:10 pm
by relic
I was wondering if there is a piece of code you can use in qb45 that will make it possible to print a number beyond 9,999,999? I noticed that while you can print 10000000, whenever you have a variable that prints the same number, it comes up as: 1E+07
thanks for any help.

Posted: Tue Mar 08, 2005 6:30 pm
by Rattrapmax6
:) like this:

Code: Select all

num# = 10000000
PRINT num#
put the # on you variable to keep it from doing scientific notations.. :wink:

Posted: Tue Mar 08, 2005 7:50 pm
by Xerol
More specifically, # defines a number as double-precision. Eventually you will hit a point where those go into xE+yy form as well, except it'll say xD+yyy instead.

You could also have done the following:

DIM num AS DOUBLE

or:

DEFDBL N

The first one declares num as a variable of type double. The second one automatically makes any variables starting with the letter N double precision.

Posted: Tue Mar 08, 2005 10:23 pm
by Mitth'raw'nuruodo
Shouldn't you make it a Long type (num&)?

re: exeeding 9,999,999

Posted: Wed Mar 09, 2005 8:18 am
by relic
It works! (of course). :D
you guys rock!

Posted: Wed Mar 09, 2005 3:27 pm
by {Nathan}
In the library section, there is a lib called "BigINT" that can handle huge #s, not just ints though. :lol: