[Xcode C-3] If and other process control, function description mark grouping, # include and llvm

Source: Internet
Author: User

1. Process Control: if, while, and for Loops


(1) If brackets often encounter conditions to determine whether they are equal, and new users often write = As =. Therefore, we suggest putting constants in front, for example, a = 10, write it as 10 = A, so it is not easy to make mistakes.


(2) Use for recursion, but it is not recommended that the recursion be too deep.


(3) specifically, for loops are the most widely used and for nesting is also important.


Ii. Function Introduction


(1) Basic Function Format


(2) differences between the Declaration and definition of a function. The declaration is generally written before and the definition is later. The statement can be repeated with the same name.


(3) function description mark group available Pragma

# Pragma mark-this method is addition # pragma mark addition int add (int A, int B) {return a + B ;}# Pragma mark subtraction int minus (INT C, int d) {return c-d ;}

The result is:


Iii. # include


(1) "" is generally used for reference of Self-compiled files, and the system uses built-in files <>. Their search paths are slightly different.


(2) include is used for multi-person collaboration.


Iv. llvm


(1) The next-generation compiler is much more efficient than GCC.


(2) The clang compiler can be used to simulate the compilation principle. CC main. C is compiled into an. out executable file, or Cc-C main. C and CC main. O.


(3) It is not a very important knowledge point to understand.

[Xcode C-3] If and other process control, function description mark grouping, # include and llvm

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.