Ferrous Moon
http://www.ferrousmoon.com:80/forums/

External settings and configuration program
http://www.ferrousmoon.com:80/forums/viewtopic.php?f=9&t=581
Page 2 of 3

Author:  prophile [Sat Feb 25, 2006 1:05 pm ]
Post subject: 

When things seriously go off-topic in this forums, people run for cover.

It usually ends in a Clash of the Titans where Burningmace and prophile attain mighty armies then battle it out before being tempbanned by Miah.

Author:  VITAS [Sun Feb 26, 2006 5:35 am ]
Post subject: 

anybody popcorn,hotdogs or sunglasses? *waves around*

Author:  ChaosR [Tue Mar 07, 2006 11:21 am ]
Post subject: 

Quote:
Code:
for ( int i = sqrt(-1); i < infinity; i++ );
is there a way to really make an infinite loop cuz
Code:
for (int i = 0; i < infinite; ++i)
doesn't work (error C2065: 'infinite' : undeclared identifier)

and it would be usefull in some of the things I'm creating. an infinite loop that only ends when you stop it (or never, good virus idea)

Author:  ConstableBrew [Tue Mar 07, 2006 11:52 am ]
Post subject: 

Code:
for(int i=0;i==i--;i++){i=0;};
Infinite loops are easy to come by. Video games are typically infinate loops. There is no variable or constant that you can refer to that holds the value of infinity. If you think about it this is because infinity is not an exact value but is instead more like a concept. Since computers only deal with exact values there is no way to represent infinity in a computer.

The easiest way to calculate infinity is to divide any number by zero.

Author:  prophile [Tue Mar 07, 2006 12:00 pm ]
Post subject: 

Overcomplicating things.
Code:
for(;;) { blah(); }

Author:  ConstableBrew [Tue Mar 07, 2006 12:07 pm ]
Post subject: 

Does that work? *thinks about it* it should... *opens up visual studio* cool!

Author:  Soldier of Light [Tue Mar 07, 2006 3:33 pm ]
Post subject: 

Some languages I know don't like that, so I use:
Code:
for(i=1;i;i) { blah(); }

Author:  prophile [Tue Mar 07, 2006 4:34 pm ]
Post subject: 

Quote:
*opens up visual studio*
Ew, visual studio.

Also, failing the for(;;) method there is another way:
Code:
while (true) { blah(); }

Author:  ConstableBrew [Tue Mar 07, 2006 6:06 pm ]
Post subject: 

That's even better than before!!! Oh the elegance of useless code.

Author:  prophile [Wed Mar 08, 2006 4:16 pm ]
Post subject: 

I disagree, this code is far from useless. In the main loop of a program you want to have it infinite and set the break conditions manually...

Author:  ConstableBrew [Wed Mar 08, 2006 4:35 pm ]
Post subject: 

An infinite loop, one that has no exit, is worthless code. Normal use of loops does just as you are saying - continue looping until it is told to stop. As interesting as while(TRUE){} is, it would be very poor coding practice to use such a loop. It makes it more difficult to figure out what the loop is doing if you have to dig into it and find a break statement.

while(!quitGame){ ... } is informative and as "infinite" as it needs to be.

Author:  prophile [Wed Mar 08, 2006 5:07 pm ]
Post subject: 

I've had a few places where it's more appropriate to break from inside the loop than outside.

Author:  ChaosR [Thu Mar 09, 2006 3:42 am ]
Post subject: 

anyway, C++ isn't my programming language. with everything i make it is always shouting there's something wrong, but when I fix that, something else breaks, and when that is fixed...

you get the point.

Author:  VITAS [Thu Mar 09, 2006 4:11 am ]
Post subject: 

...you are broke from all this time you spend on fixing :>

Author:  ConstableBrew [Thu Mar 09, 2006 10:26 am ]
Post subject: 

ChaosR, you have the dev cd?

Page 2 of 3 All times are UTC-05:00
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/