Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 972 Bytes

1.2 - Comments.md

File metadata and controls

21 lines (15 loc) · 972 Bytes

Comments are very similar to C, in that the character to start a single line comment is //, and multi-line comments are created using /* */. E.g.

// This is a comment.

/* This is also a comment
 but is written over multiple lines. */

Nested multi-line comments

Swift actually supports nested multi-line comments, which makes it easier to block and unblock large chunks of code.

/* This is the start of the first multiline comment.
 /* This is the second, nested multiline comment. */
 This is the end of the first multiline comment. */

Previous Note | Back To Contents | Next Note