Logo language

By Jun 12, 2015

Description:

JumpingTurtle a Logo language

Preferencesoft

The language

Logo is a programming language intended for education. It includes instructions that allow to move a pointer leaving traces on the screen.

This pointer has the appearance of a turtle that can advance, turn to a certain angle etc.

The interest of this language is to teach young children programming. The purpose can be for example to find the instructions to obtain a drawing or guessing which picture is obtained with instructions.

I created a mini language logo for Windows in open source. I took a limited number of standard logo language instructions and I have changed some.

You can find at this address

https://github.com/Preferencesoft/JumpingTurtle/

 
I'll make it evolve so as to create artistic designs.

Instructions
Rosace

The key words of the language are the following

walk
jump
turn
color
background
thickness
follow
end
loop
repeat
define
memorize
recall
forget
swap
duplicate


These instructions define and end are combined and used to define a block of instructions. The main block, called main must necessarily be defined in any program. The smallest program is:


define main
end


But when run with the run button, the turtle does nothing!
However, with an instruction (walk 10) placed in the block, the turtle will move 10 units and leave a trace behind its passage.

define main
walk 10
end


Initially, the turtle is in the center of the screen and looks towards the top of the screen. This program will therefore move up 10 units (10 steps).

When you want to repeat the same course several times, it is useful to define other blocks of instructions.

Always with the instructions end and define, you can set another block before the main block and call with follow.
Give an example:


define path
walk 10
end
define main
follow path
follow path
end

Trail line color

There are 142 colors for drawing and the background of the screen. The instruction color changes the color of the plot, while background changes the background color of the screen. Here are the color preceded by their number.

1 AliceBlue
2 AntiqueWhite
3 Aqua
4 Aquamarine
5 Azure
6 Beige
7 Bisque
8 Black
9 BlanchedAlmond
10 Blue
11 BlueViolet
12 Brown
13 BurlyWood
14 CadetBlue
15 Chartreuse
16 Chocolate
17 Coral
18 CornflowerBlue
19 Cornsilk
20 Crimson
21 Cyan
22 DarkBlue
23 DarkCyan
24 DarkGoldenrod
25 DarkGray
26 DarkGreen
27 DarkKhaki
28 DarkMagenta
29 DarkOliveGreen
30 DarkOrange
31 DarkOrchid
32 DarkRed
33 DarkSalmon
34 DarkSeaGreen
35 DarkSlateBlue
36 DarkSlateGray
37 DarkTurquoise
38 DarkViolet
39 DeepPink
40 DeepSkyBlue
41 DimGray
42 DodgerBlue    
43 Firebrick
44 FloralWhite
45 ForestGreen
46 Fuchsia
47 Gainsboro
48 GhostWhite
49 Gold
50 Goldenrod
51 Gray
52 Green
53 GreenYellow
54 Honeydew
55 HotPink
56 IndianRed
57 Indigo
58 Ivory
59 Khaki
60 Lavender
61 LavenderBlush
62 LawnGreen
63 LemonChiffon
64 LightBlue
65 LightCoral
66 LightCyan
67 LightGoldenrodYellow
68 LightGray
69 LightGreen
70 LightPink
 71 LightSalmon

 72 LightSeaGreen
 73 LightSkyBlue
 74 LightSlateGray
 75 LightSteelBlue
 76 LightYellow
 77 Lime
 78 LimeGreen
 79 Linen
 80 Magenta
 81 Maroon
 82 MediumAquamarine
 83 MediumBlue
 84 MediumOrchid
 85 MediumPurple
 86 MediumSeaGreen
 87 MediumSlateBlue
 88 MediumSpringGreen
 89 MediumTurquoise
 90 MediumVioletRed
 91 MidnightBlue
 92 MintCream
 93 MistyRose
 94 Moccasin
 95 NavajoWhite
 96 Navy
 97 OldLace
 98 Olive
 99 OliveDrab
100 Orange
101 OrangeRed
102 Orchid
103 PaleGoldenrod
104 PaleGreen
105 PaleTurquoise
106 PaleVioletRed
107 PapayaWhip
108 PeachPuff
109 Peru
110 Pink
111 Plum
112 PowderBlue
113 Purple
114 Red
115 RosyBrown
116 RoyalBlue
117 SaddleBrown
118 Salmon
119 SandyBrown
120 SeaGreen
121 SeaShell
122 Sienna
123 Silver
124 SkyBlue
125 SlateBlue
126 SlateGray
127 Snow
128 SpringGreen
129 SteelBlue
130 Tan
131 Teal
132 Thistle
133 Tomato
134 Transparent
135 Turquoise
136 Violet
137 Wheat
138 White
139 WhiteSmoke
140 Yellow
141 YellowGreen
142 White

Turtle Memory

Some instructions are used to store the current position of the turtle, to recall the last saved position etc. In fact, the memory of the turtle is a stack.


CSharp

Categories

Share

Follow


KodFor Privacy Policy