1.2 Comments
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. */
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. */