View Single Post
  #7   Spotlight this post!  
Unread 27-01-2008, 12:29
aaeamdar's Avatar
aaeamdar aaeamdar is offline
Post-A-Holic
AKA: Paul Dennis
FRC #1719 (The Umbrella Corp)
Team Role: College Student
 
Join Date: Jan 2006
Rookie Year: 2005
Location: Baltimore, MD
Posts: 231
aaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant futureaaeamdar has a brilliant future
Re: Using While Statements

I would NOT recommend messing with the GetData and PutData functions. Calling them twice in a single main loop may cause you big problems. The correct solution to the problem is what has been previously posted which is to use an "if" statement. The only appropriate use of a while loop in this context is for iterating through a list of processor tasks. Example:

Code:
while (x < 7)
{
    put (Math.pow(x, 2), table[x]);
    x++;
    //This is pseudocode (I forget the appropriate power function and I made up 
    // put (int, int[])
}