//mini programming language
//commands:
//  1 = pen up
//  2 = pen down
//  3 = go x
//  4 = right a
//  5 = left a
//  0 = quit

pd home fill "yellow colour "darkred pensize 2
:command = 1
//main loop
while :command
[ask "Enter "command "(1\=up, "2\=down,"3\=go,
"4\=right, "5\=left, "0\=quit) :command
if :command
 [if :command = 1 [penup]
  [if :command = 2 [pendown]
   [if :command = 3 [ask "how "much :x fd :x]
    [if :command = 4 [ask "how "much :x right :x]
     [if :command = 5 [ask "how "much :x left :x]
      [say "This "command "is "not "recognized.] // else 5
     ] //else 4
    ] //else 3
   ] //else 2
  ] //else 1
 ] //else 0
] //while loop
