Zhao yazhi _ Swift (3) _ swift annotation and Zhao yazhi _ swift Annotation
Note the non-execution text in your code into prompts or notes for future reading. The Swift compiler automatically ignores the comments when compiling the code.
Single line comment
Start with a double Forward slash:
// This is a comment
Multi-line comment
It starts with a single forward slash followed by an asterisk (/*), ends with an asterisk followed by a single forward slash (*/):
/* This is a multi-line comment */
Multiline comment Block
Swift multiline comments can be nested in other multiline comments. You can create a multi-line comment block, and then nest it into a second multi-line comment block. When terminating a comment, insert the ending mark of the second comment block, and then insert the ending mark of the first comment block:
/* This is the beginning of the first multi-line comment/* this is the second nested multi-line comment */This is the end of the first multi-line comment */
By using nested multi-line comments, you can quickly and easily comment out a large piece of code, even if the Code already contains multi-line comments.