Jump to content
  • 0
Lord Ganja

Difference of returnS?

Question

What are the differences of return, return 1, return 0, return true, return false, and any other return?

Edited by Lord Ganja

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0

 

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

Share this post


Link to post
Share on other sites
  • 0

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?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.