View Single Post
  #42   Spotlight this post!  
Unread 28-02-2015, 17:07
curtis0gj curtis0gj is offline
Registered User
FRC #5033 (Beavertronics)
Team Role: Programmer
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Canada
Posts: 121
curtis0gj will become famous soon enough
Re: functions for auto

Quote:
Originally Posted by Arhowk View Post
it doesn't really matter. "break" exits the loop while "return" exits the method. if you have code after the loop which you want to run than "break" should be used. if you want to terminate the method entirely and skip methods after the loop (or if you have no loops), than "return" should be used. if your entirely in a loop with no code after the loop, it doesn't matter.

Though, for uniformity sake, they should all probably be the same.
So I should change all of the breaks for the functions to returns just to make everything look nice?

Last edited by curtis0gj : 28-02-2015 at 20:00.
Reply With Quote