Comments
Any program requires comments, and Cairo supports a single few different varieties:
- Regular comments which are ignored by the compiler:
// Line comments which go to the end of the line.
- Doc comments which are parsed into HTML library [documentation][docs]:
/// Generate library docs for the following item.//! Generate library docs for the enclosing item.
//! This is an example of a module-level doc comment.
/// This is an example of a item-level doc comment.
fn main() { // This is an example of a line comment.
// There are two slashes at the beginning of the line.
// And nothing written after these will be read by the compiler.
// println!("Hello, world!");
// Run it. See? Now try deleting the two slashes, and run it again
}