rec.autos.simulators

infinite loop ?

Kevin Barne

infinite loop ?

by Kevin Barne » Wed, 08 Jan 2003 16:28:51

I keep reading about this infinite loop and am curious to know what it is.
The reason i ask is because i hope to get a new system in next couple of
weeks and dont want to encounter lots of problems. What is my best system
(P4 or Athlon , graphic card etc)bet for GPL Nascar 2002 GTR 2002 and LFS
Thanks in advance
Kev Barnes
Peter Ive

infinite loop ?

by Peter Ive » Thu, 09 Jan 2003 04:43:49



Please refer your original post.  :)
--
Peter Ives (AKA Pete Ivington)
Remove ALL_STRESS before replying via email
If you know what's good for you, don't listen to me :)
GPLRank Joystick -50.63 Wheel -21.77
Kevin Barne

infinite loop ?

by Kevin Barne » Thu, 09 Jan 2003 06:02:25

im still not clear what infinte loop actually is though?




> >I keep reading about this infinite loop and am curious to know what it
is.
> >The reason i ask is because i hope to get a new system in next couple of
> >weeks and dont want to encounter lots of problems. What is my best system
> >(P4 or Athlon , graphic card etc)bet for GPL Nascar 2002 GTR 2002 and
> >LFS
> >Thanks in advance
> >Kev Barnes

> Please refer your original post.  :)
> --
> Peter Ives (AKA Pete Ivington)
> Remove ALL_STRESS before replying via email
> If you know what's good for you, don't listen to me :)
> GPLRank Joystick -50.63 Wheel -21.77

Peter Ive

infinite loop ?

by Peter Ive » Thu, 09 Jan 2003 06:37:45



Please refer to my previous post.  :)

Ok, my understanding of what an infinite loop means, refers to something
that you don't want any programs to get caught up in, because basically
they will keep on cycling through the same piece of code... infinitely.
Below is a simple piece of infinite loop code

10  print 'hello'
20 goto 10

There is no way of getting beyond line 20, so any other code that may
have been written will not get executed.  This is very simplistic, but
what does sometimes cause infinite loops is when a programmer creates a
loop who's exit conditions are never met.  A simple example:

10 a = 0
20 a = a + 3
30 if a = 10 the goto 50
40 goto 20
50 ....   here the next piece of code continues on

Due to a simple mistake by myself I hadn't forseen that a will in fact
never equal 10 and so 3 will continue to be added to a when it has gone
way past 10.

at the beginning a = 0
next 3 is added to make = 3
line 30 tests for a = 10 which it doesn't
line 40 sends the program back to 20 where 3 is added to a to make 6
the test is made again
back to 30 to add 3 to a to make 9
test is made again
back to 30 to add 3 to a to make 12
add infinitum

At no time does a = 10 therefore the loop cannot exit.  In reality this
isn't quite an infinite loop as eventually the program would probably
generate an overflow error - number too large! When a became too big,
but you get the idea,  I hope.  :)

As to why you are concerned about it with regard to your computer
purchase,  I'm none too sure.

--
Peter Ives (AKA Pete Ivington)
Remove ALL_STRESS before replying via email
If you know what's good for you, don't listen to me :)
GPLRank Joystick -50.63 Wheel -21.77

Sid Chappl

infinite loop ?

by Sid Chappl » Thu, 09 Jan 2003 09:33:59

This should explain it.  http://www.viaarena.com/?PageID=64
Sid.



rec.autos.simulators is a usenet newsgroup formed in December, 1993. As this group was always unmoderated there may be some spam or off topic articles included. Some links do point back to racesimcentral.net as we could not validate the original address. Please report any pages that you believe warrant deletion from this archive (include the link in your email). RaceSimCentral.net is in no way responsible and does not endorse any of the content herein.