General Items (Python Style)
A Jeroo program includes
- whitespace
- comments
- identifiers
- indentation blocks
Whitespace
Whitespace consists of blank spaces and blank lines. These should be used to help a reader understand the logical organization of the source code.
Comments
Comments are used to provide information to a person who is reading the source code.
- Every comment begins with the number character (#), and continues
to the end of the line.
- A comment can appear at the end of a statement,
or on a separate line.
- Comments are ignored by the compiler.
Identifiers
An identifier is a name that a programmer creates for a Jeroo or a method.
- An identifier must begin with a letter or an underscore
- The remaining characters can be letters, digits, or underscores
Indentation Blocks
An indentation block is a group of consecutive statements that have been indented to the same level.
- An indentation block can contain other indentation blocks
- There are three main uses for an indentation block:
- the body of a method
- the body of a while loop
- the blocks of an if, if-else, or a cascaded-if