Thread: subs/functions
View Single Post
  #3   Spotlight this post!  
Unread 16-02-2003, 23:27
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
Subroutines work just like regular code. If you go into a subroutine, it will flow straight from the code previous to the gosub command right into the subroutine. The only thing, I believe, that you cannot do is continue if statements into the subroutine. Any variables you have in that bank will still be present and any constants will also be accessible.

Subroutines are commonly used to share equations among multiple parts of the code.

I'm not sure what exactly you are asking. Maybe you could rephrase your question.

Quote:
Originally posted by maDGag
i suppose global vars modified in sub works, but it's messy
I'm not sure how you find it 'messy'.
__________________
Programmer
----------------
Team#857
Superior Roboworks

WildStang Alum