1.Instructions
not returning a value:
******************************
back (distance);
type of parameter(s): number (-30000 to 30000)
default parameter(s): 10
description: the turtles backs up "distance" pixels.
examples:
back();
back(30);
variable = 300;
back(variable);
background color (color);
type of parameter(s): number ( from 000 to 999)
default parameter(s): none
description: allows one to choose the background color. The
three-digit number is a RGB number. Use the color picker to obtain
color numbers. You must execute clear screen(); before changing the
background color. The background color is visible with only certain
functions like circle();.
examples:
background color(345);
background color(blue);
variable = 300;
background color(variable);
change angle (angle);
type of parameter(s): floating point number (ex:
32.887),with up to 7 digits after the period.
default parameter(s): none
description: rotates the turtle to the angle defined
in degrees.
examples:
change angle(54.44);
variable = 300;
change angle(variable);
change font (name);
type of parameter(s): character string
default parameter(s): none
description: defines the font used on the screen; the default font is
Geneva ; you must use the quotation marks.
examples:
change font(times);
variable = "times";
change font(variable);
change size (size);
type of parameter(s): number (-30000 to 30000)
default parameter(s): none
description: determines the size of the font used on the screen; the
default size is 12.
examples:
change size(72);
variable = 300;
change size(variable);
change style (number);
type of parameter(s): integer ( 0 to 255)
default parameter(s): none
description: determines the style of the font used on the screen; the
default style is plain. Use the following table to set the style, by
adding the numbers corresponding to the styles you wish :
Style Number
Plain 0
Bold 1
Italic 2
Underline 4
Outline 8
Shadow 16
Condense 32
Extend 64
For example, to obtain bold and italic, carry out change
style(3); .
change x (number);
type of parameter(s): number (-30000 to 30000)
default parameter(s): none
description: puts the head of the turtle in the defined horizontal
position.
examples:
change x(30);
variable = 300;
change x(variable);
change xy (number 1,number 2);
type of parameter(s): numbers (-30000 to 30000), number 1
being the x position, number 2 being the y position
default parameter(s): none
description: puts the head of the turtle in the defined position.
examples:
change xy(30);
variable = 300;
change xy(variable, 223);
change y (positiony);
type of parameter(s): number (-30000 to 30000)
default parameter(s): none
description: puts the head of the turtle in the defined vertical
position.
examples:
change y(30);
variable = 300;
change y(variable);
clear screen();
type of parameter(s): none
default parameter(s): none
description: gives the screen the background color and erases any
drawing.
example :
clear screen();
circle (distance x,distance y);
type of parameter(s): numbers (-30000 to 30000)
default parameter(s): (50,50). If only one parameter is defined, it
will define both distance x and distance y.
description: draws an empty circle( only the perimeter ).
examples:
circle();
circle(30,30);
variable = 300;
circle(variable, 30);
don't wrap();
type of parameter(s): none
default parameter(s): none
description: prevents the turtle from crossing over to the other side
of the screen when it reaches one side. By default, the turtle
crosses over.
example :
don't wrap();
draw();
type of parameter(s): none
default parameter(s): none
description: equivalent to clear screen(); followed by initialize();,
which means that you get the initial screen with a white
background.
example :
draw();
fill circle (distance x,distance y);
type of parameter(s): numbers (-30000 to 30000)
default parameter(s): (50,50). If only one parameter is defined, it
will define both distance x and distance y.
description: draws a filled circle.
examples:
fill circle();
fill circle(30,30);
variable = 300;
fill circle(variable, 30)
fill round square (distance x,distance y);
type of parameter(s): numbers (-30000 to 30000)
default parameter(s): (50,50). If only one parameter is defined, it
will define both distance x and distance y.
description: draws a filled square with round corners.
examples:
fill round square();
fill round square(30,30);
variable = 300;
fill round square(variable, 30);
fill square (distance x,distance y);
type of parameter(s): numbers (-30000 to 30000)
default parameter(s): (50,50) (If only one parameter is defined, it
will define both distance x and distanc ey.
description: draws a filled square.
examples:
fill square();
fill square(30,30);
variable = 300;
fill square(variable, 30);
forward (distance);
type of parameter(s): number (-30000 to 30000)
default parameter(s) : 10
description: the turtle moves ahead by the number of pixels indicated
by "distance"
examples :
forward();
forward(30);
variable = 300;
forward(variable);
full screen();
type of parameter(s): none
default parameter(s): none
description: allows to show the drawing as large as the screen will
allow. The screen comes back to normal at the end of the carrying out
of the function, by executing normal screen(); or by clicking on the
mouse.
example :
full screen();
hide cursor();
type of parameter(s): none
default parameter(s): none
description: hides the mouse's cursor until the user moves the
mouse.
example :
hide cursor();
hide turtle (distance);
type of parameter(s): none
default parameter(s): none
description: only hides the turtle on the screen; the opposite is
show turtle();.
example:
hide turtle();
image ("name",dimension x,dimension y);
type of parameter(s):character string,number,number
default parameter(s): the two dimensions can be omitted if one wants
the PICT to have its default size.
description: shows on the screen a PICT image. The image must be in
the " Files " folder, otherwise you will be requested to find it.
examples:
image(tree);
image(tree,23,345);
initialize();
type of parameter(s): none
default parameter(s): none
description: puts the head of the turtle back to the center of the
screen, with the pen ( that is the top of the turtle ) directed
upwards ( 0 degree).
example :
initialize();
mask();
type of parameter(s): none
default parameter(s): none
description: locks the screen. When a complicated drawing is made,
masking accelerates the performance of the application by building
the drawing in a cache. Unmask(); draws instantly the drawing
generated.
examples:
mask();
print(hello goodbye);
unmask();
normal screen();
type of parameter(s): none
default parameter(s): none
description: brings back the screen to its normal size, after it had
been expanded with full screen().
example :
normal screen();
pen color (color);
type of parameter(s): number ( from 000 to 999) or
pre-defined variable
default parameter(s): none
description: allows one to choose the color of the mark left behind
by the turtle. The three-digit number is a RGB numbers. Use the color
picker to obtain color numbers or use the names defined in the
variables section.
examples:
pen color(blue);
variable = 312;
pen color(variable);
pen down();
type of parameter(s): none
default parameter(s): none
description: brings the pen in the downward position so that , when
the turtle moves, a mark is left behind. This instruction is used
after a pen up() instruction has been used.
example:
pen down();
pen up();
type of parameter(s): none
default parameter(s): none
description: after this instruction, moving the turtle won't leave
any mark on the screen. Pen down(); must be used later to obtain
marks.
example :
pen up();
print ("sentence");
type of parameter(s): character string or
variable containing a number or characters
default parameter(s): none
description: prints on screen the sentence or the value of the
variable ( without the ""), at the head of the turtle.
examples:
print(hello goodbye);
variable = hello
print(variable);
right (angle);
type of parameter(s): floating point number (ex: 32.887), up
to 7 digits after the period.
default parameter(s): 90
description: rotates the turtle by angle degrees to
the right.
examples:
right();
right(30);
variable = 300;
right(variable);
round square (distance x,distance y);
type of parameter(s): numbers (-30000 to 30000)
default parameter(s): (50,50). If only one parameter is defined, it
will define both distance x and distance y.
description: draws a empty square with round corners ( only the
perimeter ).
examples:
round square();
round square(30,30);
variable = 300;
round square(variable, 30);
show turtle();
type of parameter(s): none
default parameter(s): none
description: shows the turtle on the screen.
example :
show turtle();
square (distance x,distance y);
type of parameter(s): numbers (-30000 to 30000)
default parameter(s): (50,50). If only one parameter is defined, it
will define both distance x and distance y.
description: draws an empty square ( only the perimeter ).
examples:
square();
square(30,30);
variable = 300;
square(variable, 30);
unmask ();
type of parameter(s): none
default parameter(s): none
description: unlocks screen previously locked by mask();. This
masking accelerates the output since the drawing is made in a cache.
Unmasking shows the complete drawing at once
example:
unmask();
wait for click();
type of parameter(s): none
default parameter(s): none
description: suspend the execution of an instruction until a mouse
click occurs.
example :
wait for click();
wrap();
type of parameter(s): none
default parameter(s): none
description: allows the turtle to cross over to the other side of the
screen.
example :
wrap();