Home  >  Q&A  >  body text

Can anyone explain the usage of return?

Just like the homework said, what does it mean to return the string of the table? Can this value be called? There is my code in the notes. Is this return correct?

小圈圈~小圈圈~2500 days ago1869

reply all(7)I'll reply

  • 又白又帅又可爱

    又白又帅又可爱2017-11-20 12:19:48

    The best understanding of using functions in programming: http://blog.csdn.net/xiaowu12345678910/article/details/78255055#t4

    reply
    0
  • phpcn_u33708

    phpcn_u337082017-11-19 14:41:53

    return is just a return execution result. Where should the result be returned every time a method is written?

    reply
    0
  • victory!

    victory!2017-11-18 15:35:37

    Put it inside the method and return the result of method execution when called

    reply
    0
  • nearest

    nearest2017-11-17 14:55:02

    return is used to return a value, or stop running subsequent statements. That is, after you call this function, you can get the return data.

    reply
    0
  • 小圈圈~

    So what is the purpose of the string returned in the table in this chapter's homework?

    小圈圈~ · 2017-11-17 15:50:48
  • 尹天雄

    尹天雄2017-11-17 11:16:25

    The literal meaning is to return.

    Return in a function can return the execution result of the function. If there is no return, NULL is returned. Statements after return are no longer executed.

    reply
    0
  • 小圈圈~

    So what is the purpose of the string returned in the table in this chapter's homework?

    小圈圈~ · 2017-11-17 15:50:55
  • Cancelreply