LibreLogo

LibreLogo is a simple, localized, Logo-like programming environment with turtle vector graphics for teaching of computing (programming and word processing), DTP and graphic design. See http://www.numbertext.org/logo/librelogo.pdf.

LibreLogo toolbar

The LibreLogo toolbar (View - Toolbars - Logo) contains turtle moving, program start, stop, home, clear screen, program editor/syntax highlighting/translating icons and an input bar (command line).

Turtle moving icons

They are equivalents of the Logo commands “FORWARD 10”, “BACK 10”, “LEFT 15”, “RIGHT 15”. Clicking on one of the icons will also focus the turtle shape scrolling the page to its position.

Start Logo program

Click on the icon “Start Logo program” to execute the text (or only the selected) text of the Writer document as a LibreLogo program. In an empty document an example program will be inserted and executed.

Click on the icon “Stop” to stop the program execution.

ཁྱིམ།

Click on the icon “Home” to reset the position and settings of the turtle.

Clear screen

Click on the icon “Clear screen” to remove the drawing objects of the document.

Program editor/Syntax highlighting/Translating

The “magic wand” icon sets 2-page layout for program editing, expands and converts to uppercase the abbreviated, lowercase Logo commands in the Writer document. Change the language of the document ( - Languages and Locales - General - Western) and click on this icon to translate the Logo program to the selected language.

Command line

Hit Enter in the command line to execute its content. To stop the program use the icon “Stop”.

Hold down the Enter to repeat the command line, for example, on the following command sequence:

 FORWARD 200 LEFT 89

To reset the command line triple-click it or press +A to select the previous commands, and type the new commands.

Graphical user interface of basic turtle settings

Turtle shape of LibreLogo is a normal fixed size drawing object. You can position and rotate it on standard way, too, using the mouse and the Rotate icon of the Drawing Object Properties toolbar. Modify Line Thickness, Line Color and Area Color settings of the turtle shape to set PENSIZE, PENCOLOR and FILLCOLOR attributes of LibreLogo.

Program editing

LibreLogo drawings and programs use the same Writer document. The LibreLogo canvas is on the first page of the Writer document. You can insert a page break before the LibreLogo programs and set page zoom using the “magic wand” icon of the Logo toolbar, also change the font size for a comfortable 2-page layout for LibreLogo programming: left (first) page is the canvas, right (second) page is the LibreLogo program editor.

LibreLogo programming language

LibreLogo is an easily localizable, Logo-like programming language, localized in several languages by LibreOffice native language communities. It is back-compatible with the older Logo systems in the case of the simple Logo programs used in education, eg.

 TO triangle :size
REPEAT 3 [
FORWARD :size
LEFT 120
]
END

triangle 10 triangle 100 triangle 200

Differences from the Logo programming language

Other features of LibreLogo

LibreLogo commands

Basic syntax

Case sensitivity

Commands, color constants are case insensitive:

 PRINT “Hello, World!”
print “Hello, World, again!”

Variable names are case sensitive:

 a = 5
A = 7
PRINT a
PRINT A

Program lines

Lines of a LibreLogo program are paragraphs in the Writer document. A program line can contain multiple commands:

 PRINT “Hello, World!” PRINT “LibreLogo”

ནང་དོན་ཚུ།

Lines or line parts are comments from a semicolon to the end of the line (paragraph):

 ; some comments
PRINT 5 * 5 ; some comments

Break program lines to multiple paragraphs

It’s possible to break a program line for more paragraphs using the character tilde at the end of the line:

 PRINT “This is a very long ” + ~
“warning message”

Turtle moving

FORWARD (fd)

 FORWARD 10 ; move forward 10pt (1pt = 1/72 inch)
FORWARD 10pt ; see above
FORWARD 0.5in ; move forward 0.5 inch (1 inch = 2.54 cm)
FORWARD 1" ; see above
FD 1mm
FD 1cm

BACK (bk)

 BACK 10 ; move back 10pt

LEFT (lt)

 LEFT 90 ; turn counterclockwise 90 degrees
LEFT 90° ; see above
LT 3h ; see above (clock position)
LT any ; turn to a random position

RIGHT (rt)

 RIGHT 90 ; tu