View Single Post
  #4   Spotlight this post!  
Unread 23-01-2004, 22:33
echos's Avatar
echos echos is offline
Jack of all trades
#1125
Team Role: Programmer
 
Join Date: Dec 2003
Location: San Diego, CA
Posts: 61
echos will become famous soon enough
Send a message via ICQ to echos Send a message via AIM to echos Send a message via MSN to echos Send a message via Yahoo to echos
Re: is there a problem with...

just thought I would emphasize on this for the n00bs.

Code:
 for (n = 0; n <= 150; n++)
{
 // For statements are a type of loop for exuting a snipet of until 
 // it evalueates to false. In the above statement the structure goes 
 // as follows. The first part is the intial variable settings before 
 // looping, the secound part is the testing part, and the third part is 
 // what to do after every loop. 

// The following example will loop 150 times before evaluating to false 
// or 0 ending the loop. 

// code
}

another variation
n = 0

while(n <= 150)
{
// Simular to the above statement except that this uses a "global" 
// variable which can be called other places in the program. 

// code

n++;
}