|
Post by Vladik on Dec 30, 2004 14:28:30 GMT -5
|
|
|
Post by bfr on Dec 31, 2004 15:28:29 GMT -5
While is to wierd. For is AWESOME!
|
|
|
Post by Vladik on Dec 31, 2004 15:46:41 GMT -5
While is useful for internal loop control, though.
|
|
|
Post by bfr on Jan 1, 2005 12:50:38 GMT -5
Probably true.
|
|
|
Post by Vladik on Jan 1, 2005 15:08:26 GMT -5
Well, as I stated earlier, you COULD modify a For loop...
But this is inefficient.
|
|
|
Post by bfr on Jan 5, 2005 20:42:10 GMT -5
But goto/label loops have a good internal loop control too.
|
|
|
Post by Vladik on Jan 5, 2005 20:53:49 GMT -5
They're slower.
|
|
|
Post by bfr on Jan 6, 2005 16:43:04 GMT -5
Not by much. Oh, and they have even better internal loop control (in most situations). Also, did everyone forget about repeat?
|
|
|
Post by Vladik on Jan 6, 2005 19:38:32 GMT -5
Wit Ifs only. Repeats are Do...While (like in C)
|
|
iak
I got this calculator for math class.
Posts: 1
|
Post by iak on Jan 6, 2005 20:30:31 GMT -5
It depends on your needs. You can replace the for loop with the while loop and vice versa. If the while loop condition is not properly defined you can get an indefinite loop.
|
|
|
Post by Vladik on Jan 6, 2005 21:07:08 GMT -5
EXACTLY! Perfectly said.
|
|
|
Post by bfr on Jan 7, 2005 17:07:11 GMT -5
Just so everybody knows, I mistakedly called Goto/Label a loop (although it can act a LITTLE like a loop...). Thanks for someone pointing that out.
|
|
|
Post by Vladik on Jan 7, 2005 17:10:39 GMT -5
It's very slow.
|
|
|
Post by Vladik on Jan 7, 2005 17:11:30 GMT -5
While is winning (Hooray!)
|
|
|
Post by bfr on Jan 7, 2005 17:33:06 GMT -5
Man, I should of voted for "While". But although for doesn'y allow as much internal loop control, it is just fast, possibly faster. I forgot. I haven't used For and While in a while.
|
|
|
Post by Vladik on Jan 7, 2005 17:46:08 GMT -5
You mean you were using Goto...Lbl???
|
|
|
Post by bfr on Jan 7, 2005 18:25:57 GMT -5
Well, I used goto/label for a while, until I discoverec the Mad powers of While and Repeat (I already new about For()
|
|
|
Post by Vladik on Jan 7, 2005 18:37:51 GMT -5
While is much better than repeat! Okay, they're approximately the same.
|
|
|
Post by bfr on Jan 8, 2005 9:49:42 GMT -5
Well, in SOME (note: some) situations While can prove to be much more efficient.
|
|
|
Post by Vladik on Jan 8, 2005 13:53:56 GMT -5
Repeat is like Do...While; the condition will ALWAYS repeat AT LEAST once.
While will not always repeat even once.
I believe that While is more useful in keyboard-based games (as bcherry said.)
|
|