Logo++ language brief overview
Logo++ language is very simple. It consists of exactly
8 keywords:
- walk <n>
tells the turtle to walk <n> steps while drawing a straight line in
its path.
- jump <n>
moves the turtle <n> steps as in walk but without drawing its path.
- turn <n>
turns the turtle <n> degrees counterclockwise.
- repeat <n> ... loop
repeats <n> times the instructions between repeat and loop statements.
<n> must be greater or equal to 1.
- define <id> ... end
provides a procedure call mechanism. The block between the two delimiting
statments could be invoked using the giving <id>
example:
define square
repeat 4
walk 100
turn 90loop
end
- draw <id>
used to draw a previously defined block with define...end constructs.
example:
draw square
For more examples visit the gallery.