View Single Post
  #6   Spotlight this post!  
Unread 12-02-2003, 16:02
ChrisA's Avatar
ChrisA ChrisA is offline
Registered User
#0857 (Superior Roboworks)
Team Role: College Student
 
Join Date: Feb 2002
Location: Michigan Tech
Posts: 157
ChrisA is on a distinguished road
Send a message via AIM to ChrisA
Re: Re: And yet, ANOTHER questions

Quote:
Originally posted by yangotang
pressure_check:
If high_pressure = 0 THEN gosub compressor_go_on
If high_pressure = 1 THEN gosub compressor_go_off


i believe you forgot the gosub command. i may be wrong though.
Using the gosub command makes the label act as a subroutine. In otherwords, you are able to use the return command to go back to where you left off. In an if then statement, any label stated after the then is considered to be a goto statement. The goto command simply jumps to the corresponding label and does not allow usage of the return command.
__________________
Programmer
----------------
Team#857
Superior Roboworks

WildStang Alum