Swift Fundamentals: Part IV: (in-depth functions and closures)

Source: Internet
Author: User

Interview questions: (1) What kind of projects you have done before, and how to talk about your project from an architectural perspective.

(2) What do you think of the different versions of iOS, and how do you deal with version issues during the project?

(3) How you optimize the performance of iOS.

(4) What test tools will you use to test your project (memory management, interface testing) in the course of your project?

(5) The location of your domicile, where you live, why you are living in the development, university major. (similar to the survey account, right).

Although, have not been exposed to such problems before, but in the actual development, we really have encountered these problems, but you do not even notice, these problems are a developer from the programmer to become architects, must know some common sense, well, I will continue to refuel. All right, let's add to the function of section two today.

1. Functions are just a few.

(0) Basic form of function:

Func function name (parameter: parameter type), return value {function Body}

(1) No return included:

(NULL)

(2) Return with participation:

Func halfofsum (Num1:int, Num2:int)->int

{

Return (NUM1+NUM2)/2

}

Halfofsum (20,num2:30)

(3) No participation returns:

(4) No participation, no return:

(5) There are several returns:

Func studentinfo (name:string, age:string, Sex:string, addrress:string) (name:string, age:string, sex:String, addrress:string)

{

Return (name,age,sex,address)

}

Studentinfo ("Zhangsan", Age: "A", Sex: "Male", addrress: "Guangdong Shenzhen")

(6) Non-participating returns:

Swift Fundamentals: Part IV: (in-depth functions and closures)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.