Swift learns Day004 and swiftday004

Source: Internet
Author: User

Swift learns Day004 and swiftday004
5. Control Flow 5.1 loop 5.1.1 for in

5.1.2 increasing for conditions

5.1.3 while

5.1.4 do while

5.2 Condition Statement 5.2.1 if else

5.2.2 switch case

5.2.2.1 interval matching and metadata group 5.3 Control Transfer 5.3.1 continue

5.3.2 break

5.3.3 fallthrough (throughout)

5.3.4lebel6. Function 6.1 Function Definition and call

6.2 function parameters and return values 6.2.1 multiple parameters 6.2.2 no parameters and return values

6.2.3 multiple return values

6.3 function parameter name 6.3.1 common parameter 6.3.2 External Parameter Name

6.3.3 default external parameters

6.3.4 external parameters of default parameters

** The code for writing default parameters always reports an error --!

6.3.5 variable parameters

6.3.6 Input and Output Parameters

6.4 function type 6.4.1 function types in Swift

6.4.2 functions of the same type can be assigned values.

6.4.3 function type as parameter and Return Value

6.4.4 Nested functions (Nested Function) 6.5 Function nesting


Learn swift for beginners who are not familiar with it.

New languages, more convenient programming operations, as long as you have the confidence to learn well, certainly can.
If you have a certain c foundation, you can learn it faster and better.
The key to learning well lies in your own efforts.

With swift, it is also necessary to learn objectivec for ios development.

Swift was launched, and obj-c will not be discarded too quickly. Obj-c has a complete set of APIs. Currently, obj-c must be used for projects in the near future or within 1-2 years. Swift is only used to play games. Apple's official suggestion is that the main project is written in obj-c, and swift is used to develop plug-ins.

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.