A Jeroo program must contain a main section, and usually contains several user-defined Jeroo methods
Main Section
Every Jeroo program must include a main section. Code for the main section is written in the main tab of the editor, and must have the following form.
#-- declare and instantiate all Jeroos
#-- use the Jeroos to solve the problem
All Jeroos must be declared and instantiated at the
beginning of the main section.
The rest of the main section is used to direct the actions of the
Jeroos by sending them messages to execute predefined or
user-defined methods.
User-Defined Jeroo Methods
A Jeroo program can have any number of user-defined Jeroo methods.
defidentifier(self):
#-- body of the method (indented)
A user-defined method extends the capabilites of every Jeroo.
The source code in a user-defined Jeroo method must invoke a
method directly, instead of sending a message to a specific Jeroo.
For example, hop() instead of jessica.hop().
A user-defined Jeroo method can invoke other user-defined Jeroo
methods. It can even invoke itself; this is called recursion.
User-defined Jeroo methods can appear in any order in the source code.
SYNTAX NOTE:
The first line of the body must be indented further than def.
The body includes all lines that are indented
at least as far as the first line of the body.
The "next statement" should be indented exactly as far as def.