View Single Post
  #5   Spotlight this post!  
Unread 06-02-2003, 20:35
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Quote:
Originally posted by rust710
Or the PBasic 2.5 version

If auton_mode = then
gosub AUTONOMOUS ' Jumps to subroutine for autonomous movement '
else
Gosub Normal_operation ' Jumps to subroutine for normal operation '
endif

Basicly the same as 2.0 but looks nicer and is easier to code.
If you're doing 2.5, you can also do it all in one line:
Code:
IF auton_mode=1 THEN GOSUB autonomous ELSE GOSUB normal_operation
I just posted a rather lengthy reply to a similar question in this thread that you may want to look at.

--Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php