View Single Post
  #2   Spotlight this post!  
Unread 08-03-2011, 17:51
Vikesrock's Avatar
Vikesrock Vikesrock is offline
Team 2175 Founder
AKA: Kevin O'Connor
no team
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2007
Location: Manchester, NH
Posts: 3,305
Vikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond reputeVikesrock has a reputation beyond repute
Send a message via AIM to Vikesrock Send a message via MSN to Vikesrock Send a message via Yahoo to Vikesrock
Re: Run something only once in a while loop?

So if I understand correctly you want some piece of code inside a while loop to run only the first time the loop runs?

This can be accomplished by placing the desired code inside a case structure that is fed by a comparison with the out put of the little blue "i" block in the corner. This block keeps track of the number of loop iterations. I can't recall off hand whether it starts at 0 or 1 (I think 1) but you should be able to trigger your case structure by doing an "equal to" on the output of.

Let me know whether that made any sense or not
__________________


2007 Wisconsin Regional Highest Rookie Seed & Regional Finalists (Thanks 930 & 2039)
2008 MN Regional Semifinalists (Thanks 2472 & 1756)
2009 Northstar Regional Semifinalists (Thanks 171 & 525)
Reply With Quote