Your browser does not support the canvas element - sorry!
run
stop
clear

Code examples

Demos

empty
close

Code examples

close

Programs / Procedures

to programname :variable
   for [ a 1 10 ] [ fd :a rt 2 ]
   rt 90
   fd random 100
   lt 45
   wait 30
   fd :variable
   if :variable > 1 [
      programname :variable - 1
   ]
end
 
programname 10
You may create your own reusable 'procedures' (or 'programs') using the 'to' and 'end' commands.
Procedures may also include one or more variables.
Procedures can also be used recursively, which mean that they can call themselves.
Once a procedure has been entered, it can be launched like a simple command.
close

All commands / Reference