SETPOS
SETPOS pos
Moves the turtle to an absolute X,Y coordinate. The argument is a list of two numbers, the X and Y coordinates. See also POS.
pos:(LIST) List of two numbers representing desired X,Y coordinate.
Example 1:(draw a square)
cs setpos [0 100] setpos [100 100] setpos [100 0] setpos [0 0]
Example 2:(the most common logo question)
make "x 0 make "y 100 setpos [:x :y] <will fail> setpos (list :x :y)
<will work>
Why, because the first case IS a list that contains 2 words :x and :y. In the second case a list is BUILT containing the value of :x and :y. You can see this more clearly by using the SHOW command.
show [:x :y] [:x :y] show (list :x :y) [0 100]
SETXY
SETXY xcor ycor
Moves the turtle to an absolute X,Y coordinate. The two arguments are numbers, the X and Y coordinates. See also POS.
xcor:(NUMBER) The desired X coordinate. ycor:(NUMBER) The desired Y coordinate.
Example (draw a sine wave):
repeat 360 [setxy repcount 100*sin repcount]
PO
PO contentslist
Command that prints out to the write stream the definitions of all procedures, variables, and property lists named in the input contentslist.
contentslist:(LIST) List of three lists containing procedures, variables and properties.
Example:
to xxx
print "Hello
end
po contents
to xxx
print "Hello
end