Create and assign turtles.
These commands handle the number of turtles, how they are created, and how to talk to them.
A list of all turtles.
ALLTURTLES outputs a list of the names of every turtle that currently defined in Logo.
ALLTURTLES is equivalent to the command
Arranges turtles in a circle.
CTURTLES activates and makes visible the number of turtles specified by its input
and arranges them in a circle in the center of the Graphics window. See also
Arranges turtles in a row.
LTURTLES activates and makes visible the number of turtles specified by its input and
arranges them in a horizontal line along the center of the Graphics window. See also
Creates a range of turtles.
SETTURTLES number SETT number
SETTURTLES defines the total number of turtles available. Their numbers range from 0 to the input of SETTURTLES minus 1. For example, SETTURTLES 16 will create the turtles [0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15]. By default, Logo starts with 16 turtles defined and turtle 0 activated.
SETTURTLES creates turtles with the following characteristics:
|Position||Home [0 0]|
|Font:||Default system font, 9 points|
SETTURTLES accepts any number as input. The actual maximum of turtles depends
on the speed of the computer.
Therefore, SETTURTLES sets the maximum number of turtles that you can define to 99, although you could use the
DECLARE command to create more.
Logo Pro can drive around 10.000 turtles without becoming too slow. If the turtles
are hidden, Logo Pro may be able to drive several more turtles.
Sets the name of a turtle.
SETTURTLENAME :turtle :name
TURTLE name sets the alias name of the widget whose object name is supplied as its first
input. It also sets the widget's
TOOLTIP property. Note that the new name is an alias to the original name; you can use both the original and the alias name to address the widget.
To get the widget alias name, see
Gets the name of the first active turtle.
TURTLENAME outputs the name of the first active turtle. This is also the value of its NAME property.
To set the turtle name, see
Outputs a list of all turtle names.
TURTLENAMES outputs a list of the names of all turtles. Note that this list does not output turtle numbers, but names if a turtle has been given an alias name. Use
ALLTURTLES to obtain a list of turtle numbers.
Reports the number of turtles.
TURTLES Result: 16