Coasterdude Posted March 20, 2007 Share Posted March 20, 2007 lets say for example there is a function SomeFunction(stuff) then under it there is if ( something == 1 ) { return; } So if the IF is true, does the "return;" make it leave the SomeFunction(stuff) function? More Questions: When/Why/Should I use "break;" When/Why/Should I use loops Sorry for the newb questions lol. I really love programming and I want to learn . Link to comment Share on other sites More sharing options...
bzug0 Posted March 20, 2007 Share Posted March 20, 2007 If I understand you question right: break; - is to stop loops ( for, while,... ) return; - is to make the function return, for example: int function() { //this function should return an int return 1; //this function returns 1 and ends. } You should read a programming book, or something... Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.