Each line is made up of function calls, of which there are two types:
commands (which usually do something—effects—but do not return a value) like print.

operations (which just return a value, its output) like sum, first or readlist.

A command is similar to a Pascal procedure, and an operation is similar to a Pascal function. (
See also: command-query separation, where a query is an operation in Logo).
A special subset of operations, called predicates, which just output the word true or false, are conventionally written with a final p. Examples include emptyp, wordp, and listp.

Expressions can be primitives, or can be defined by the user.

Expressions can take zero, one or more parameters.

Procedures can be defined on the command line, using the  TO  END  pair:
TO CHAIR  REPEAT 4 [FD 100 RT 90]  FD 200  END
However, in some early Logos the procedure is limited to the physical line length of the input device.

All Logos can invoke an Editor, usually by EDALL.
In the editor, procedures may be written over many lines, as nothing is interpreted until the edit is complete.

EDALL
TO CHAIR
REPEAT 4 [FD 100 RT 90]  FD 200
END
The new word is saved into the available vocabulary, but the definition will be lost once the Logo session is over.
 Internally procedures are words and in this case, any time CHAIR is entered, the sequence REPEAT 4 [FD 100 LEFT 90] FD 200 will be executed.
The word CHAIR can be used as a command; for example, REPEAT 4 [CHAIR] would repeat the CHAIR operation four times.

EDALL ;(to enter the editor mode, then the actual procedure)
TO ERASECHAIR
PE
BK 200 REPEAT 4 [FD 100 RT 90]
PPT
END
CS CHAIR WAIT 200 ERASECHAIR
A WAIT delay between the drawing and the erasing can introduce the illusion of motion:
CS REPEAT 20 [CHAIR WAIT 200 ERASECHAIR PENUP FD 20 PENDOWN]
Each line is made up of function calls, of which there are two types:
commands (which usually do something—effects—but do not return a value) like print.
operations (which just return a value, its output) like sum, first or readlist.
A command is similar to a Pascal procedure, and an operation is similar to a Pascal function. (See also: command-query separation, where a query is an operation in Logo). A special subset of operations, called predicates, which just output the word true or false, are conventionally written with a final p. Examples include emptyp, wordp, and listp.
Expressions can be primitives, or can be defined by the user.
Expressions can take zero, one or more parameters.
Procedures can be defined on the command line, using the  TO  END  pair:
TO CHAIR  REPEAT 4 [FD 100 RT 90]  FD 200  END
However, in some early Logos the procedure is limited to the physical line length of the input device.
All Logos can invoke an Editor, usually by EDALL. In the editor, procedures may be written over many lines, as nothing is interpreted until the edit is complete.
EDALL
TO CHAIR
REPEAT 4 [FD 100 RT 90]  FD 200
END
The new word is saved into the available vocabulary, but the definition will be lost once the Logo session is over.  Internally procedures are words and in this case, any time CHAIR is entered, the sequence REPEAT 4 [FD 100 LEFT 90] FD 200 will be executed. The word CHAIR can be used as a command; for example, REPEAT 4 [CHAIR] would repeat the CHAIR operation four times.
EDALL ;(to enter the editor mode, then the actual procedure)
TO ERASECHAIR
PE
BK 200 REPEAT 4 [FD 100 RT 90]
PPT
END
CS CHAIR WAIT 200 ERASECHAIR
A WAIT delay between the drawing and the erasing can introduce the illusion of motion:
CS REPEAT 20 [CHAIR WAIT 200 ERASECHAIR PENUP FD 20 PENDOWN]
UCBLogo