Commands & Constants Reference

The languages understood by the Turtle System come with several built-in procedures and functions, including those that implement the Turtle Graphics drawing metaphor. A full list of commands is show in the table below. For convenience, they have been grouped into 12 categories, and divided into three difficulty levels. Only simple commands are shown by default; use the checkboxes below to show intermediate and advanced commands as well.

The Turtle System has 50 predefined colour constants, shown in the table below. Every command that takes a colour argument (e.g. the COLOURcolourcolourcolourcolourcolour command, which sets the Turtle’s current drawing colour) can be given an RGB value, or one of the predefined colour names below. The compiler will translate this name into the corresponding RGB value. Alternatively, you can also use the corresponding number between 1 and 50 together with the RGBrgbrgbrgbrgbrgb command. For example, BLUEblueblueblueblueblue is equivalent to RGB(3)rgb(3)rgb(3)rgb(3)rgb(3)rgb(3).

The Turtle System has 16 fonts for drawing text on the canvas, shown in the table below. The PRINTprintprintprintprintprint command takes a font parameter, which must be an integer between 0 and 255. The integers in the range 0-15 correspond to plain versions of the 16 fonts. To render the text in italics, add 16 to this base; to render it in bold, add 32; to render it underlined, add 64; and to render it with a line through, add 128. These additions are cumulative, so to render the text in italic and bold, for example, add 48 (i.e. 16+32).

The native CURSORcursorcursorcursorcursorcursor command sets which cursor to display when the mouse is over the canvas. Setting it to 0 makes the mouse invisible. Values in the range 1-15 set it to the cursor shown in the table below (move your mouse over each box to preview the cursor). Any other value will reset to the default cursor. Note that the actual cursor displayed depends on your operating system, and may vary from computer to computer.

The KEYSTATUSkeystatuskeyStatuskeystatuskeystatuskeyStatus and RESETresetresetresetresetreset commands both take an integer parameter specifying the index of the key in the key status array (see the Turtle Languages Help: User Input page). These indexes correspond to the standard numeric codes for keys used in a variety of contexts. To save you from having to remember them, the Turtle System has several predefined constants providing you with simpler mnemonics for these codes. The full list is given below.

CommandParametersReturnsDescription

Colours

No.Name
Value
No.Name
Value
No.Name
Value
No.Name
Value
No.Name
Value
Font Family NamePlainItalicBoldItalic+BoldUnderlinedStrikethrough
No.NameNo.NameNo.NameNo.Name
NumberName