Commands and Reporters
A procedure can be either a command or a reporter. Either kind of procedure can have zero or more inputs, but commands always have zero outputs and reporters always have exactly one output.
One way to tell commands and reporters apart is from their tank diagrams. The tank diagram of a reporter has an outgoing pipe that carries its output. For example, here is the tank for the reporters sum, xcor and first:
Since commands don't report anything, they have no output pipe. Here are tanks for the fd, home and glide commands:
Commands are procedures that are used to change the state of projects, pages, turtles, buttons, sliders, text boxes, colors, hyperlinks, media objects, dialog boxes, choosers and the Command Center.
Commands don't report output to other procedures.Examples of commands: presentationmode, page1, setx, fd, setslider1, set. The following procedures are not commands: xcor, sum, word, get.
A procedure that reports output to other procedures is called a reporter. The OP command is used to report output from procedures that you write yourself.
Examples of reporters: color, quotient, first, text1, get. The following procedures are not reporters: freezebg, page1, setc, fd, settext1, set.
Input is the information a procedure needs before it can be invoked. For example, in the following instruction
50 is the input to the fd command
Output is the information reported by a reporter. For example, in the instruction below
fd product 5 10
the output of the product reporter is 50.
Setters and Getters
All the setters and getters below either set or get information from the turtle's backpack