Parsing Objective-C Program Design

Source: Internet
Author: User

Objective-C ProgrammingIs the content to be introduced in this article, mainly introducesObjective-C Programming. Let's just look at the details.

 
 
  1. #import <Foundation/Foundation.h> 
  2. int main(int argc,const char *argv[])  
  3. {  
  4.     NSAutoreleasePool *pool = [[NSAutorelease Pool alloc] init];  
  5.     NSLog(@"Programmint is fun!");  
  6.     [pool drain];  
  7.     return 0;  

Output: Programming is fun!

1. Compile and run the program

You can use Xcode or the CNU Objective-C compiler to compile and run the program in the Terminal window.

1. Xcode

Xcode is located in the application sub-folder in the Develope folder,

2. Terminal

Developers who are used to using UNIX shells and command lines.

II,

1. In the OC language, note "//" and ""

2. # import: import or include the file information into the program.

3. Use [pool drain] to release the allocated memory pool and objects associated with the program ).

4. NSLog history is a function in the OC library, which only displays or records the parameter or parameter list ). Displays simple phrases, variable values, and variable results.

Summary: AnalysisObjective-C ProgrammingI hope this article will help you!

Related Article

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.