 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Thomas Willms Guest
|
Posted: Mon Feb 13, 2006 10:03 am Post subject: what is the problem |
|
|
how to count with a loop, (for i:=1 to x, repeat or whatever) to very high
numbers (> 1E15) ?
proposed methods (posted before, answer on 9.2) don't work): Comp and INT64
don't work.
Thanks |
|
| Back to top |
|
 |
Nicholas Sherlock Guest
|
Posted: Mon Feb 13, 2006 10:03 am Post subject: Re: what is the problem |
|
|
Thomas Willms wrote:
| Quote: | how to count with a loop, (for i:=1 to x, repeat or whatever) to very high
numbers (> 1E15) ?
proposed methods (posted before, answer on 9.2) don't work): Comp and INT64
don't work.
|
var i:int64;
i:=0;
repeat
do_stuff;
until i>x;
Cheers,
Nicholas Sherlock
--
http://www.sherlocksoftware.org |
|
| Back to top |
|
 |
Nicholas Sherlock Guest
|
Posted: Mon Feb 13, 2006 11:03 am Post subject: Re: what is the problem |
|
|
Nicholas Sherlock wrote:
| Quote: | var i:int64;
i:=0;
repeat
do_stuff;
until i>x;
|
Sorry, I missed the all important inc(i) line after do_stuff.
Cheers,
Nicholas Sherlock
--
http://www.sherlocksoftware.org |
|
| Back to top |
|
 |
Brian Cryer Guest
|
Posted: Mon Feb 13, 2006 6:03 pm Post subject: Re: what is the problem |
|
|
"Thomas Willms" <th.willms (AT) wanadoo (DOT) fr> wrote in message
news:43f053e0 (AT) newsgroups (DOT) borland.com...
| Quote: | how to count with a loop, (for i:=1 to x, repeat or whatever) to very high
numbers (> 1E15) ?
proposed methods (posted before, answer on 9.2) don't work): Comp and
INT64 don't work.
Thanks
|
Thomas, it would be easier for others to follow the thread if this had been
posted as a reply in the previous thread that you had started. By posting
this as a new question most people will not be aware of what went before.
--
Brian Cryer
www.cryer.co.uk/brian |
|
| Back to top |
|
 |
Loren Pechtel Guest
|
Posted: Tue Feb 14, 2006 3:03 am Post subject: Re: what is the problem |
|
|
On Mon, 13 Feb 2006 10:43:16 +0100, "Thomas Willms"
<th.willms (AT) wanadoo (DOT) fr> wrote:
| Quote: | how to count with a loop, (for i:=1 to x, repeat or whatever) to very high
numbers (> 1E15) ?
proposed methods (posted before, answer on 9.2) don't work): Comp and INT64
don't work.
|
No matter what the format you will eventually find a point where it
simply gives an overflow. This is absolutely inherent in the nature
of the storage formats and is *NOT* a bug.
For an int64 your machine will probably die first, though. |
|
| Back to top |
|
 |
Patrick Quinn Guest
|
Posted: Wed Feb 15, 2006 1:03 am Post subject: Re: what is the problem |
|
|
Thomas Willms wrote:
| Quote: | how to count with a loop, (for i:=1 to x, repeat or whatever) to very high
numbers (> 1E15) ?
proposed methods (posted before, answer on 9.2) don't work): Comp and INT64
don't work.
Thanks
Thomas, you keep starting new threads about same thing. |
Check out the help files of whatever program you use to access this
newsgroup, and read about how to WRITE new messages and how to REPLY to
them. Look up THREADS. You will get much more help from people if you do
this correctly.
Regards
Patrick
By the way, have you tried breaking number down into two bits e.g.:
for i := 0 to iii do
for j := 0 to jjj do
Something; |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|