
| Command |
Description |
Example of use |
|||
|---|---|---|---|---|---|
| Home |
Move turlte to the centre of the screen |
Home |
|||
| Clear |
Remove all drawing and move turlte to the centre of the screen | Clear |
|||
| Go _step_ |
Move forward by given _step_ |
Go 100 |
|||
| Left _angle_ |
Turn turtle left by _angle_ |
Left 90 |
|||
| Right _angle_ | Turn turtle right by _angle_ | Right 45 |
|||
| PenDown |
Start drawing |
PenDown | |||
| PenUp |
Stop drawing |
PenUp | |||
| PickColor _color_ |
Select color for turtle's pen. Turle will use this color from that moment on. You can specify _color_ in two ways: 1) provide color name like Red, White or 2) provide color Red, Green and Blue components in the form of #RRGGBB RR, GG, BB are hexadecimal values from 00 to FF |
PickColor #FF0000 |
|||
| Repeat |
This is a loop command which works in two variants: 1) Repeat - Times. This variant allowes you to execute the loop specified number of times. For example: Repeat Go 100 Left 90 Times 4 2) Repeat - While . This variant executes the loop as long as the condition which is just after While is true. For example: A = 10 Repeat A=A+1 While A<100 |
# executes 10 times Repeat # some commands Times 10 # infinite loop Repeat # some commands While 1 |
|||
| If _condition_ Do _command_ |
Check if given _condition_ is true. If so then executes given _command_ |
A=4 B=2*2 If B=A Do Go 100 |
|||
| _Variable_=_Expression_ |
Assign _Expression_ value to a names _Variable_ |
X=5*5 Y=X/2 |
|||
| OutText _X_,_Y_ _Text_ |
Write
_Text_ under location given by _X_ and _Y_ coordinates. _Text_ can be a
combination of text and math expressions. For example: "Some Text"5*2 this will produce SomeText10 |
OutText 10, 10 "Hello World!" |
|||
| _label_: |
You can tag some part of your code by giving it a label. You canthen go to such lable using command Goto _label_ |
my_label: |
|||
| Goto _label_ |
If there exists a label named _label_ then this command will move execution to this label. |
Goto my_label |
|||
| Function _Name_ _Params_ |
You can create named blocks of
code which you can then re-use many times. Such blocks should have Name
and they also can have parameters. Every block Starts with the word
"Function" and ends with the word "EndFunction". Bellow are examples:
|
Function Rect X Repeat Go X Left 90 Times 4 EndFunction |
|||
| Call _Function_ _Params_ |
Executes previously created function. For example: Function Shape X,Y Repeat Go Y Left 360/X Times X EndFunction Call Shape 8, 100 |
Call Shape 8,100 |


