Files
freeCodeCamp/guide/chinese/swift/comments/index.md
2018-10-16 21:32:40 +05:30

28 lines
537 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Comments
localeTitle: 注释
---
## 注释
注释允许您记录您的代码。 Swift编译器忽略注释仅对阅读代码库的人有用。
单行注释以两个正斜杠`//`开头。
#### 例:
```swift
// Hello, single-line comment!
```
多行注释以正斜杠开头,后跟星号`/*` ,以星号后跟正斜杠`*/`
#### 例:
```swift
/* Hello,
multiline-line comment! */
```
#### 更多信息:
* [Swift编程语言](https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html#ID315)