TO SQUARE :SIDE :ANGLE
    FORWARD :SIDE
    RIGHT :ANGLE
    FORWARD :SIDE
    RIGHT :ANGLE
    FORWARD :SIDE
    RIGHT :ANGLE
    FORWARD :SIDE
END

TO TEST :X :Y
    PENDOWN
    SQUARE :X :Y
    PENUP
    RIGHT 90
    FORWARD 50
    PENDOWN
    SQUARE 100 90
END

TO SQUARE2 :SIDE
    REPEAT 4 [FORWARD :SIDE RIGHT 90]
END
TO TEST2
    (LOCAL "X "Y "Z )
    MAKE "X 15
END

TO TEST3
    REPEAT 4 [ FORWARD 100
               RIGHT 90 ]
END

TO SQ.SPIRAL
    MAKE "SIDE 1
    REPEAT 60 [FORWARD :SIDE RIGHT 90 MAKE "SIDE :SIDE+3]
END

TO XYZ
    OUTPUT 100
END

TO OUTSPIRAL :SIDE :INC :ANGLE
    FORWARD :SIDE
    RIGHT :ANGLE
    OUTSPIRAL :SIDE + :INC :INC :ANGLE
END


TO SPIRAL :SIDE :INC :ANGLE
     PENDOWN
     REPEAT 150 [FORWARD :SIDE RIGHT :ANGLE MAKE "SIDE :SIDE + :INC]
     PENUP
END

TO INC.COLOUR
        MAKE "COLOUR :COLOUR + 1
        IF :COLOUR > 14 THEN MAKE "COLOUR 1
END



TO RECURSE :DATA
     PRINT :DATA
     MAKE "DATA :DATA + 1
     RECURSE :DATA
END

TO CIRCLE :RADIUS
     REPEAT 360 [FORWARD :RADIUS RIGHT 1]
END

TO POLYGON :RADIUS :SIDES
        REPEAT 360 / :SIDES [FORWARD :RADIUS RIGHT 360 / :SIDES]
END

TO ACTION :INSTRUCTIONS
    RUN :INSTRUCTIONS
END

TO TESTHOME
        PENDOWN
        REPEAT 10 [RIGHT RANDOM(90) FORWARD RANDOM(100)]
        HOME
END

TO TESTLIST
   MAKE "MYLIST [THE FAT CAT SAT ON THE MAT]
   MAKE "IC COUNT :MYLIST
   MAKE "CI 1
   REPEAT :IC [PRINT ITEM :CI :MYLIST MAKE "CI :CI + 1]
END

TO TESTVAR
LOCAL "Y
        MAKE "X [GLOBAL VARIABLE]
        MAKE "Y [LOCAL VARIABLE]
        DISPLAY.VARS
END

TO DISPLAY.VARS
        PRINT :X
        PRINT :Y
END




























