Notes on the swift programming language-page 24th

Source: Internet
Author: User
The swift Programming Language Reading Notes on the seventh page contains two main content: print the output and how to comment out code 1 in swift how to print the value of variables and constants? Use the println function. For details, the println function outputs a line feed in addition to the variable constant value. 1) print the constant eg1 let hW = "Hello chinagame. me "println (HW) => The String constant can be output to the console. 2) print the variable and use \ (variable name) to output it in double quotation marks, this is like % s eg2 var QQ = 1941847311 println ("My QQ's number is \ (qq)") in C language. How can I comment out the code? 1) Use // to comment out a single line of code. 2) Use/* and */to comment multiple lines in the same way as other languages.

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.