April 2026
Intermediate
631 pages
16h 20m
English
Comments, print commands, and input handling are essential tools for writing clear, interactive, and user-friendly code. Let’s go through each of these tools in detail in this section.
Commented lines start with two back slashes (//), as in the following example:
// The current line is a comment line
Rust supports multiline comments using the /* */ syntax. These comments can span multiple lines and are useful for temporarily disabling sections of code or for writing longer explanations without using multiple // lines. For example:
/* This is a multi-line comment that spans multiple lines and can be used anywhere in the code.*/
Other types of commenting styles include document comments, ...
Read now
Unlock full access