Topic:   Re: FOR explained   (Read 8692 times)


0 Members and 1 Guest are viewing this topic.

Xiphos


  • GMG-er

  • **


  • Posts: 676
Re: FOR explained
« on: February 24, 2010, 05:50:12 PM »
Yes!

Charlo


  • GMG-er

  • **


  • Posts: 451
Re: FOR explained
« Reply #1 on: February 25, 2010, 03:47:22 PM »
I personally never use FOR loops in any language.  I prefer to make almost everything a WHILE.  Just my style, though.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: FOR explained
« Reply #2 on: February 25, 2010, 06:11:42 PM »
WHILE? ... How does this work?
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: FOR explained
« Reply #3 on: February 28, 2010, 06:06:04 PM »
Aww crap I removed the first post
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: FOR explained
« Reply #4 on: February 28, 2010, 06:10:15 PM »
lol! ;D Were you trying to edit it?

While loops are pretty neat. The logic is basically "WHILE (condition = true) THEN do this"

Here's an example with Javascript syntax:

Quote
while (x==1) {
 Â Do this please.
 Â }
« Last Edit: February 28, 2010, 06:11:16 PM by Silverwind »
I survived the spammage of 2007