Lord Ganja 5 Posted August 23, 2015 (edited) What are the differences of return, return 1, return 0, return true, return false, and any other return? Edited August 23, 2015 by Lord Ganja Quote Share this post Link to post Share on other sites
0 Dastgir 1246 Posted August 23, 2015 It depends on return type of function, and what does function do... Quote Share this post Link to post Share on other sites
0 Lord Ganja 5 Posted August 23, 2015 It depends on return type of function, and what does function do... Ohh. Okay. So if it's like ' -1 = yes, 0= no, 1 = maybe ' return 0 will be no and return -1 will be yes? Quote Share this post Link to post Share on other sites
0 Winterfox 83 Posted August 23, 2015 @@Lord Ganja Usually return 0 and return false, mean the same. The same is true for return 1 and return true. Every other return value is usually either data or some kind of success/error code. Quote Share this post Link to post Share on other sites
0 Emistry 145 Posted August 23, 2015 It depends on return type of function, and what does function do... Ohh. Okay. So if it's like ' -1 = yes, 0= no, 1 = maybe ' return 0 will be no and return -1 will be yes? Depend on what you want the script/function to return. It's depend on what you want it to be, what these value will be represent. It's all define by yourself. Or course, these "1/0" , "true/false" are some standard that you could follow. Useful to indicate the outcome of function is "success/fail" ... https://answers.yahoo.com/question/index?qid=20121125180438AAk9sSo Quote Share this post Link to post Share on other sites
0 Lord Ganja 5 Posted August 24, 2015 Thank you for you answers Quote Share this post Link to post Share on other sites
What are the differences of return, return 1, return 0, return true, return false, and any other return?
Edited by Lord GanjaShare this post
Link to post
Share on other sites