《The Swift Programming Language》的筆記-第24頁

來源:互聯網
上載者:User

標籤:swift開發   中遊學院   swift   chinaswift.me   ios swift   

The Swift Programming Language讀書筆記學習筆記 第24頁本頁主要內容有兩個:列印輸出和如何在swift注釋代碼1 如何列印變數和常量的值?   使用println函數,細節:println函數除列印變數常量值外還輸出一個換行   1) 列印常量   eg1    let hw = "hello chinagame.me"             println(hw)            => 可將字串常量輸出到Console裡   2) 列印變數, 雙引號裡用 \(變數名) 輸出,這個像C語言裡的%s   eg2    var  qq = 1941847311            println("my qq‘s number is  \(qq)")2 如何注釋代碼?   1)用 // 注釋單行代碼   2)和其他語言一樣用 /* 和 */ 可注釋多行

相關文章

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.