Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Comments

Comments are used to annotate code without affecting its behavior. This is useful for adding descriptions to your code that offer further explanation of the functionality.

There are two types of comments in Ranty: single-line and multi-line.

Single-line comments

A single-line comment begins with the # character and terminates at the end of the current line. They do not have to start at the beginning of a line.

# This is a comment
{A|B|C} # This is an inline comment

Multi-line comments

A multi-line comment can span multiple lines and is enclosed by two # characters on each end:

##
This is
a multi-line
comment
##