Go to Post Feelings are like the laws of physics: if some one feels offended or alienated, then they are offended or alienated - it doesnt matter why you dropped a hammer, if it falls on someones head they will be hurt. You cant expect it to not hurt, because you did not intend to hurt them. - KenWittlief [more]
Home
Go Back   Chief Delphi > Other > VEX
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Spotlight this post!  
Unread 01-11-2006, 06:55
Timothy D. Ginn's Avatar
Timothy D. Ginn Timothy D. Ginn is offline
I check here maybe once a year.
no team
 
Join Date: Apr 2003
Rookie Year: 2002
Location: Port Perry, ON. Canada
Posts: 247
Timothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to allTimothy D. Ginn is a name known to all
Send a message via ICQ to Timothy D. Ginn Send a message via AIM to Timothy D. Ginn Send a message via MSN to Timothy D. Ginn Send a message via Yahoo to Timothy D. Ginn
Re: While loops

This really depends on what the while loop does. If it's say, something to the effect of:

Code:
int i = 0;
while(i < 10) {
  i++;
}
then certainly you can do it. If, instead you're doing something relying on external sensors/states. For example, in pseudo code:

Code:
while(button is pushed) {
  do stuff
}
then you won't get anywhere because whether or not the button is pushed isn't going to be updated within your function (that updating in some of the FIRST-provided code which you don't need to and shouldn't modify; but, if you're curious you can look). If your code doesn't let the program flow continue to the FIRST-code which updates buttons you just won't have the new status of the button being pushed (and as a result you'll be stuck).

It's probably worth noting that your user code is already in a big while loop (the one you rightly pointed out is in the main function) and as a result already will be called repetitively.
__________________
Alumni of FRC Team 1006
Former mentor of Full Lego Alchemist (FLL 5621) - Sempar School / Computing Students' Association of Queen's University
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
POLL: control loops Rickertsen2 Programming 2 28-10-2004 20:32
loops inside of subs??? manodrum Programming 4 19-02-2003 20:05
Solution to Timing Loops Steven Carmain Programming 39 10-02-2003 13:33
PID Control Loops ttedrow Programming 7 05-12-2002 12:03
Programming Loops Mike o. Programming 5 26-03-2002 11:24


All times are GMT -5. The time now is 21:22.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi