C0 | Documentation
About Downloads Tutorial References Courses
C0 Tutorial C0 and other languages Other references

Comments

Comments in C0 are following the C/C++ tradition. You can have single-line comments, starting with // and extending to the end of the line, or delimited comments starting at /* and ending at */. Stylistically, we recommend delimited comments /* ... */ even for single-line comments, leaving the //@ syntax for contracts so they are particularly easy to distinguish visually.

/* file comment.c0 */
// this is a single line of comments
/* this is a comment
 * stretching over multiple lines
 */

Unlike C, comments of the latter form can be nested, so you can comment out whole regions regardless of whether the region already contains comments.

/* the rest of this file is a single comment */
/*
// this is a single line of comments
/* this is a comment
 * stretching over multiple lines
 */
*/