SuperLogo Help - Contents

In this help file you will find all sorts of information about SuperLogo, the commands, the special words and the screen.

  About the SuperLogo Language

  Using SuperLogo


SuperLogo Help - Contents

In this help file you will find all sorts of information about SuperLogo , the commands, the special words and the screen.

  About the SuperLogo Language

  Categories of Procedures

  How to Use Alphabetical List of Procedures

  Alphabetical List of Procedures

  Logo Language Basics

  Programming in SuperLogo

  Using SuperLogo


SuperLogo Help - Contents

In this help you will find all sorts of information about SuperLogo , the commands, the special words and the screen.

  About the SuperLogo Language

  Using SuperLogo

  Starting and Quitting SuperLogo

  Main Window

  Memory Window

  Editing User Defined Objects

  Choosers


About SuperLogo Help ...

SuperLogo Help 1.1 - 1995 is designed and developed by

A. Blaho, S. Jager, I. Kalaš, A. Stuur and P. Tomcsányi

SuperLogo 1.1

© 1995 A. Stuur

A.W.Bruna Uitgevers B.V., Utrecht, the Netherlands

based on Comenius Logo

© 1995 A. Blaho, I. Kalaš, P. Tomcsányi

Bratislava


How to Use Alphabetical List of Procedures
How to Use the Alphabetical List of Procedures

In the Alphabetical List of Procedures you can find a lot of information about all the SuperLogo primitive procedures and special words. In the Kids Help there are about a hundred.

You will always see:

NAME OF THE PROCEDURE	Abbreviation - (if any)

the categories the command belongs to

other procedures that are like this command

:	how to use the command (procedure) together with the kind of input

effect:	if it is a command then this will tell you what the command does. Below you will see more detailed information together with examples. Examples are often pieces of code shown in the the command dialogue.

An example of the command. Click on the lightbulb to open the example.


Programming in SuperLogo

Programming consists of defining your own procedures that solve problems, specify turtles' behaviour, draw, make use of different data types, make calculations etc.

To define your own procedures you must specify the order of steps to be taken. However, quite often this isn't straightforward: some steps must be repeated several times, some steps must be executed only if a condition is true etc.

Repeating commands

How to define your own procedures

Comments in procedures


Main Window

This opens on the screen as soon as SuperLogo is started. After a short time it is maximised to cover the whole screen. It serves many purposes: from here you control the application and the whole Logo environment, type in Logo language instructions, and see the results of your work.

Parts of the Main Window

Menu Bar

Speed Bar

Using the Keyboard

Using the Mouse


See also...

Control Menu Commands


Main Window

This opens on the screen as soon as SuperLogo is started. After a short time it is maximised to cover the whole screen. It serves many purposes: from here you control the application and the whole Logo environment, type in Logo language instructions, and see the results of your work.

Parts of the Main Window

Menu Bar

File Menu Commands

Edit Menu Commands

Window Menu Commands

Option Menu Commands

Help Menu Commands

Speed Bar

Using the Keyboard

Using the Mouse


Main Window

This opens on the screen as soon as SuperLogo is started. After a short time it is maximised to cover the whole screen. It serves many purposes: from here you control the application and the whole Logo environment, type in Logo language instructions, and see the results of your work.

Parts of the Main Window

Menu Bar

Speed Bar

Buttons on the bar

Using the Keyboard

Using the Mouse


Main Window

This opens on the screen as soon as SuperLogo is started. After a short time it is maximised to cover the whole screen. It serves many purposes: from here you control the application and the whole Logo environment, type in Logo language instructions, and see the results of your work.

Parts of the Main Window

Menu Bar

Speed Bar

Using the Keyboard

The function keys F1 - F12

Other keys and their functions

Using the Mouse


Main Window

This opens on the screen as soon as SuperLogo is started. After a short time it is maximised to cover the whole screen. It serves many purposes: from here you control the application and the whole Logo environment, type in Logo language instructions, and see the results of your work.

Parts of the Main Window

Menu Bar

Speed Bar

Using the Keyboard

Using the Mouse

Left Mouse Button

Right Mouse Button


Memory Window

This window makes it possible to view any procedure you have written (or any user-defined object). These objects can be created, loaded from a project, viewed, edited, saved as a project, or erased easily from here.

Parts of the memory window

Menu Bar


Memory Window

This window makes it possible to view any procedure you have written (or any user-defined object). These objects can be created, loaded from a project, viewed, edited, saved as a project, or erased easily from here.

Parts of the memory window

List of objects

Inspection area

Menu Bar


Memory Window

This window makes it possible to view any procedure you have written (or any user-defined object). These objects can be created, loaded from a project, viewed, edited, saved as a project, or erased easily from here.

Parts of the memory window

Menu Bar

File Menu Commands

Object Menu Commands

Options Menu Commands


File Editor Window
File Editor

In the File Editor you can read, create or modify text files. It is a simple text editor for:

processing Logo program files, that is, files with LGO extension,

processing Logo Problems files, that is, files with TXT extension,

editing the Logo initialisation file SLOGO.INI.

If the Editor contains a Logo program (the definitions of our own procedures, variables, and properties), or regular Logo commands with their inputs, it can be directly executed (run) from here. Several File Editor Windows can be opened and used together (for copying and pasting parts of the text from one file to the other, etc.). In its title bar, each File Editor Window has either the name of edited file, or Logo Editor - [untitled], if you choose File Menu New command.

How to edit a file in the File Editor

Menubar

File Menu Commands

Edit Menu Commands

Search Menu Commands

Options Menu Commands

Execute Menu


File Editor Window
File Editor

File Editor makes it possible to read, create, or modify text files. It is a simple text editor for:

processing Logo program files, that is, files with LGO extension,

processing Logo Problem files, that is, files with TXT extension,

editing Logo initial file SLOGO.INI.

If the contents of the Editor is a Logo program (the definitions of our own procedures, variables, and properties), or regular Logo commands with their inputs, it can be directly executed (run) from here. Several File Editor Windows can be opened and used together (for copying and pasting parts of the text from one file to the other, etc.). In its title bar, each File Editor Window has either the name of edited file, or Logo Editor - [untitled], if we choose File Menu New command.

How to edit a file in the File Editor

Menubar

File Menu Commands

Edit Menu Commands

Search Menu Commands

Options Menu Commands

Execute Menu


Starting and Quitting Logo
Starting and Quitting SuperLogo

Once SuperLogo is installed, you will find a new group called SuperLogo in Program Manager Window. It will contain the following icon:

To start it, either double-click the icon or click it and press Enter key. The SuperLogo Main Window will open on the screen.

To do the same without the mouse, select the SuperLogo group using Control/Tab the press Enter. Use the arrow keys to select the SuperLogo icon then press Enter. If there are other active applications running, use Alt+Tab to cycle through them to choose Program Manager, then use Ctrl+F6 until SuperLogo window is highlighted.

To quit the application, either double-click the application window control menu button, or select File menu Exit Logo command (Alt, F,X), or type the BYE Logo primitive command in the text screen. A dialogue box then appears asking:

SuperLogo is being closed

Do you want to save your work?

Here you can choose the Yes, No or Cancel button to save, quit, or cancel this dialogue and continue the work.


I belong to ...

  About the SuperLogo Language


I belong to ...

  Using SuperLogo


I belong to ...

  On Choosers


Standard Elements ...

All of these elements are either standard Windows elements, like control menu in the upper left corner, or standard Windows Help elements, like menu commands File, Edit etc., and buttons Contents, Search, Back etc.


Glossary Button ...

is an additional button in SuperLogo Help. When pressed, it opens a page containing the whole index of terms essential to SuperLogo.


ABC Button ...

is an additional button in SuperLogo Help. When pressed, it opens a page containing the complete alphabetical list of all Logo primitive procedures.


Name of the Procedure ...

Here you will find complete and abbreviated (if there is one) name/names of the procedure.


Number of Inputs ...

This area specifies:

whether this Logo primitive procedure is a command or an operation,

the number of inputs it needs. Note that Logo distinguishes between basic and variable number of inputs.


Category Classification ...

The text hidden behind this icon specifies the category into which this procedure is classified. Quite often one procedure belongs to one, two or even three categories of procedures.


See Also ...

Here you will find a list of all Logo primitive procedures which are similar to this one.


Example 1 ...

You will find this icon with procedures which have some examples accompanying them. If you click the icon, SuperLogo Help Example Window opens containing its own icons and text to be read and tried in SuperLogo.


Example 2 ...

Some procedures are accompanied with more than one example. If we click the icon, SuperLogo Help Example Window opens containing its own icons and text to be read and tried directly in SuperLogo.


Advanced Features ...

You will only find this icon with more advanced procedures. When you click the icon, you jump into the second page describing the procedure. In this way you divide the complete procedures description into two separate pages. The advanced page may contain some more alternatives to the inputs etc.


Chooser ...

You will find this icon with those procedures which have their own chooser . When you click the icon, you jump into the page describing the chooser.


Description of Inputs ...

Here you can find detailed description of all procedures inputs, their types, the way they are used with this procedure, all alternative formats etc.


Description of the Procedure ...

Here you can find a detailed description of the procedures behaviour, how it works with other Logo primitive procedures etc.


The order of Computations for numbers
The order of Calculation for numbers

Calculations are always executed in this order:

-	from left to right;

-	multiplication before division;

-	division before addition;

-	addition before subtraction.


Wees voorzichtig met de volgorde van berekeningen
Be careful with the order of calculations

SHOW  (BUTLAST  123)  +  (BUTFIRST  543)	; 55

SHOW  BUTLAST  123  +  BUTFIRST  543	; 16

In the operation of (BUTLAST  123)  +  (BUTFIRST  543) SuperLogo first calculates BUTLAST of 123 - makes 12 - and then BUTFIRST of 543 - which makes 43.
After that the results will be added up.

When you do not use brackets, 123 will be added up first with BUTFIRST  543. That makes 43. After that BUTLAST will be operated, which gives the result 16. In general + is operated before other operations like BUTFIRST or BUTLAST. When you want to change this order, you have to use the brackets.


Het escape-teken en verboden tekens
The escape-character and forbidden characters

This is a difficult command and isn't

explained in the Help for Kids


Basic Definitions - Abbreviation...
Abbreviations...

Many procedures have alternative short names - abbreviations. These are especially for frequently used procedures with long names. Abbreviations save space and make instructions more readable.

For example, we can type:

FD	instead of	FORWARD

LT	instead of 	LEFT

BG	instead of	BACKGROUND etc.


Kenmerken
Properties

is a pair consisting of a name and a value. Any number of properties with different names can be associated with a word..

For the word ELEPHANT we can define following properties:

with name	and value

-----------------------------------------

 WEIGHT	3200	by   PPROP "ELEPHANT "WEIGHT 3200

 AGE	1.MONTH	by   PPROP  "ELEPHANT "AGE "1.MONTH

 NAME	JUMBO	by   PPROP  "ELEPHANT "NAME "JUMBO

All defined properties associated with a word form the property list of the word.

To find it, use the PLIST operation.  To get the property list for ELEPHANT:

? SH PLIST "ELEPHANT

[WEIGHT 3200 AGE 1.MONTH NAME JUMBO]


Input for a command or operation

An input could be anything in SuperLogo. Examples are:

numbers: 55, -55, 0, 67.7777434,

images:

words: JOHN, TRUE, Welcome to.SuperLogo

lists: [How  are  you], [ ], [A  B  [C  D [E]  F]

Important! 	For the expression PRINT  DIFFERENCE  222  11, the input for PRINT is the number 211. First the calculation is made, the result is the input for PRINT.

SUM  66  21 	; 87

AMOUNT "JAN	;3

Every number, word, list or output of an operation can be used as input for another operation or command.


Wanneer gebruik je TEST, ALSNIETWAAR en ALSWAAR
When do you use TEST, IFFALSE or IFTRUE

This is a difficult command and isn't

explained in the Help for Kids


Active procedures

Active procedures are user defined Logo procedures which have not yet finished their work.


User Defined Objects

This is a difficult command and isn't

explained in the Help for Kids


Hoe gebruik je verschillende varianten van een afbeelding
How to Use Frames of an Image

Any image can be used by a turtle as its shape, see the SETSHAPE command.. There are two different methods used to display the turtle using its shape's frames:

To change the method, use SETFRAMEMODE command.

To change current frame in the SETFRAMEMODE "FALSE mode, use RIGHT, LEFT or SETHEADING commands. To change current frame in the SETFRAMEMODE "TRUE mode, use SETFRAME command.

To find the currently depicted frame in both modes, use FRAME operation.


Filenames

is a word specifying a file. SuperLogo - and Windows in general - uses MS-DOS naming conventions.


Extensions

The following extensions are used by SuperLogo for filenames:

.BMP for bitmaps (e.g. Paintbrush drawings)

.LGP for SuperLogo-projects,

.LGW for files with images,

.TXT for problems files,

.WAV for audio files


Procedures verbergen
Hiding procedures

This is a difficult command and isn't

explained in the Help for Kids


How to make your own Demo Project

A demo project is any Logo project saved as LGP file in the DEMO subdirectory. It must contain a procedure named STARTUP. If the demo project also contains an image variable ICON, its value is used as the project's icon in the Demo Projects Window. Otherwise, the default SuperLogo icon is used instead.


Syntax

This shows the syntax of the command.

See also:

Syntax of input

Typing SuperLogo instructions on the Command Line


Knop in de knoppenbalk
Button in the Buttonbar

This is a button in the buttonbar.


SuperLogo Help voor Kinderen
SuperLogo Help for Kids

SuperLogo Help for Kids is written by Addo Stuur and Stefan Jager.

SuperLogo is a part of the package Programming for Kids with SuperLogo©

published by A.W. Bruna Informatica.

ISBN 90 229 3843 3

© 1994 Addo Stuur

A.W. Bruna Uitgevers B.V.


Clipboard

The clipboard is a temporary space in the computer memory for saving text or images you have cut or copied. You can use the clipboard to move text within the Object Editor, or from one procedure to another.

You can cut or copy text from one place and paste it somewhere else, you can paste the contents of the clipboard to the command line in the Text screen (and then run it), you can copy small images from other Windows applications to MegaPaint etc..

Text and images are always put on the clipboard with the Cut and Copy commands. The information on the clipboard is stored until new text or a new image is copied to the clipboard. The contents of the clipboard is always inserted at the new location with the Paste command.


Basic Definitions - Prompt...
Prompt...

is any word (empty or non empty) not longer than 16 characters which appears in the text screen whenever Logo expects us to type an instruction/instructions into the command line. The default text prompt is a question mark followed by a space.


Basic Definitions - Command Line...
Command Line ...

is an editing line of the text screen. It begins with the actual text prompt or the special character (>) showing that we are defining a procedure, see procedure TO. In the command line we type Logo instructions or any data expected and processed by a running program.

The contents of the command line may actually be longer than 80 characters. In this case it is automatically wrapped into the following line. If you want to finish  the command line and let Logo evaluate its contents, press Enter.

If you press Esc instead of Enter, the command line is cleared and nothing happens.

Command Line Editing Keys


Basic Definitions - Image...
Image...

is one of the data types which in Logo may become a value of a variable. It is an empty or non empty series of frames, i.e. bit maps which may be stored in LGW files and used in your projects. An image can be attached to any turtle as its actual shape. Following image is normally used as the basic (default) turtle shape:

You can make turtles of any shape you want to use in your programs:

Some more notes:

By SETFRAMEMODE command we can change the way in which frames in a turtle's file are used.

Images can be used as parts of our drawings using the PUTIMAGE command (and others).

We can work with images in similar way to words and lists.

The maximum number of frames in an image is 250.

The maximum size of a frame is 255 x 255 points.


Basic Definitions - Project...
Project ...

is the most important idea in SuperLogo. You use Logo either to run or to develop a project; to "solve a problem" by creating our own turtles, by defining their behaviour in procedures and variables, by creating or importing the contents of the graphics screen etc.

A project (saved in an .LGP file) is a complex structure containing all the information about:

all turtles (that is, all facts about each existing turtle),

all user-defined objects (if you check this option while saving the project),

the complete state of the Main Window, that is, how the screen is divided between text and graphics screens, the actual contents of the graphics screen (if you check this option while saving the project), size of the graphics screen, its background colour, text colours, whether the Speed Bar is shown, whether the Buttons Window is shown or not and the texts defined for its buttons, whether the project has been saved with the Native Language Version on or off,

if there is an image variable named ICON (of exactly 32 x 32 size) defined at the time of saving the project, its value is converted into an icon which is used as the project's icon in the Demo Projects Window.


Active Turtle

is any turtle which is actually a member of the WHO list. To make a turtle active, use TELL command.

When a turtle is created or recreated by MAKETURTLE command, it immediately becomes the youngest turtle, that is the last turtle of the ALLTURTLES list. The order of turtles in ALLTURTLES list can be changed using the REORDER command and is important when some turtles' shapes are overlapping on the screen - the younger the turtle is, the fewer turtles can cover it. The youngest turtle is always on the top of all others.

The active turtle is said to be the first active turtle, if it is the first member of ALLTURTLES list. That is, if it is the oldest turtle.


  Alphabetical List of Procedures

The following list contains all commands, operations and words in SuperLogo. Some of these procedures have abbreviations to save typing. These are shown on the right.

Commands, operations and words are classified into groups. See Categories of Procedures for more detailed description of each category together with the list of related procedures and words.

- A -

ALL

ALLTURTLES;  ALL

ASK

- B -

BACK;  BK

BACKGROUND;  BG

BF

BG

BK

BL

BUTFIRST;  BF

BUTLAST;  BL

BUTTONS

- C -

CHAR

CHOOSER

CLEAN

CLEARSCREEN;  CS

CLEARTEXT;  CT

CODEAREA

COUNT

CS

CT

- D -

DATE

DIFFERENCE

DRAW

- E -

EACH

EMPTY?

END

ERASETURTLE;  ERTURTLE

- F -

FALSE

FD

FILL

FIRST

FORWARD;  FD

FRAME

FPUT

- G -

GRAPHICSCREEN;  GS

GREATER?

GS

- H -

HEADING

HIDEBUTTONS

HIDESPEEDBAR

HIDETURTLE;  HT

HOME

HT

- I -

IF

INC

INSIDE?

ITEM

- J -

- K -

KEY?

- L -

LAST

LEFT;  LT

LESS?

LIST

LIST?

LOADSCREEN

LPUT

LT

- M -

MAKE

MAKETURTLE

MEMBER?

MOUSE

- N -

NUMBER?

- O -

OUTSIDE?

OVERLAP?

OVERLAPPED

- P -

PD

PE

PENDOWN;  PD

PENERASE;  PE

PENUP;  PU

PL

PLAY

PLAYW

PLAYWAVE;  PLAYW

POS

PR

PRINT;  PR

PRINTLINE;  PL

PRODUCT

PU

- Q -

QUOTIENT

- R -

RANDOM

READCHAR;  RC

READLIST;  RL

READLISTDIALOG;  RLD

READLISTTURTLE;  RLT

READWORD;  RW

REORDER

REPCOUNT;  REPC

REPEAT

RIGHT;  RT

RLD

RLT

RT

RUN

- S -

SE

SENTENCE;  SE

SETBACKGROUND;  SETBG

SETBG

SETBUTTONS

SETFC

SETFILLCOLOUR;  SETFC

SETFILLPATTERN;  SETFP

SETH

SETHEADING;  SETH

SETMC

SETMOUSECURSOR;  SETMC

SETPATTERN

SETPC

SETPENCOLOUR;  SETPC

SETPENWIDTH; SETPW

SETFRAME

SETFRAMEMODE

SETPOS

SETPW

SETSHAPE

SETSHAPECOLOUR

SETTC

SETTS

SETTT

SETTTEXT;  SETTT

SETX

SETXY

SETY

SH

SHOW;  SH

SHOWBUTTONS

SHOWN?

SHOWSPEEDBAR

SHOWTURTLE;  ST

SOUND

SPLITSCREEN;  SS

SS

ST

STAMP

SUM

- T -

TELL

TEXTSCREEN;  TS

TIME

TO

TOWARDS

TRUE

TS

TT

TTEXT;  TT

TYPE

- U -

- V -

- W -

WAIT

WAITUNTIL

WHO

WORD

WORD?

- X -

XCOR

- Y -

YCOR

- Z -

- ... -

*

+

-

/

<

<=

<>

=

>

>=


Categories of Procedures

SuperLogo procedures (the commands, operations and all words with special meanings) are classified into different categories. Several procedures or words are listed in more than one category.

The turtle

Calculations and numbers

Words and lists

Procedures, files and logical operations

Screens and buttons

Mouse and keyboard

Music and multimedia


Categories of Procedures

SuperLogo procedures (the commands, operations and all words with special meanings) are classified into different categories. Several procedures or words are listed in more than one category.

The turtle

Drawing with the turtle

Working with the turtle

Working with images and frames of turtles

Calculations and numbers

Words and lists

Procedures, files and logical operations

Screens and buttons

Mouse and keyboard

Music and multimedia


Categories of Procedures

SuperLogo procedures (the commands, operations and all words with special meanings) are classified into different categories. Several procedures or words are listed in more than one category.

The turtle

Calculations and numbers

Calculations

Working with numbers

Words and lists

Procedures, files and logical operations

Screens and buttons

Mouse and keyboard

Music and multimedia


Categories of Procedures

SuperLogo procedures (the commands, operations and all words with special meanings) are classified into different categories. Several procedures or words are listed in more than one category.

The turtle

Calculations and numbers

Words and lists

Operations on words and lists

Procedures, files and logical operations

Screens and buttons

Mouse and keyboard

Music and multimedia


Categories of Procedures

SuperLogo procedures (the commands, operations and all words with special meanings) are classified into different categories. Several procedures or words are listed in more than one category.

The turtle

Calculations and numbers

Words and lists

Procedures, files and logical operations

Logical operations

Testing and editing of procedures

Working with procedures

Working with files

Creating and using variables

Screens and buttons

Mouse and keyboard

Music and multimedia


Categories of Procedures

SuperLogo procedures (the commands, operations and all words with special meanings) are classified into different categories. Several procedures or words are listed in more than one category.

The turtle

Calculations and numbers

Words and lists

Procedures, files and logical operations

Screens and buttons

Working with the screen

Working with buttons

Working with the command screen

Mouse and keyboard

Music and multimedia


Categories of Procedures

SuperLogo procedures (the commands, operations and all words with special meanings) are classified into different categories. Several procedures or words are listed in more than one category.

The turtle

Calculations and numbers

Words and lists

Procedures, files and logical operations

Windows and buttons

Mouse and keyboard

Working with the mouse and keyboard

Music and multimedia


Categories of Procedures

SuperLogo procedures (the commands, operations and all words with special meanings) are classified into different categories. Several procedures or words are listed in more than one category.

The turtle

Calculations and numbers

Words and lists

Procedures, files and logical operations

Windows and buttons

Mouse and keyboard

Music and multimedia

Working with music


Category: calculations

Numeric operations are procedures with one, two or more numbers as input. The output is used by other operations or commands.

*

+

-

/

DIFFERENCE

PRODUCT

QUOTIENT

RANDOM

SUM


Category: working with numbers

Some commands check if statements are true or not. Their output is either TRUE or FALSE. This output is used by other SuperLogo commands.

<

<=

>

>=

<>

=

EQUAL?

GREATER?

LESS?


Category: operations for words and lists

These operations are procedures with words and lists as their inputs. Their output is used by other operations or SuperLogo commands.

=

ASCII

BF

BL

BUTFIRST;  BF

BUTLAST;  BL

CHAR

COUNT

EMPTY?

EQUAL?

FIRST

FPUT

ITEM

LAST

LESS?

LIST

LIST?

LPUT

MEMBER?

NUMBER?

SE

SENTENCE;  SE

WORD

WORD?


Category: logical operations

These commands can tell you if something is true or not.

FALSE

IF

TRUE


Category: creating and using variables

This category includes operations and commands which allow you to create, modify and remove variables.

DATE

INC

MAKE

SETFRAME

FRAME

REPCOUNT

RUN

TIME


Category: testing and editing procedures

These are commands you can use to repeat something or check to see if anything happened.

IF

INSIDE?

KEY?

MAKE

OUTSIDE?

REPC

REPCOUNT;  REPC

REPEAT

RUN

WAIT

WAITUNTIL


Category: working with procedures

This category includes commands to create or run procedures.

END

TO

RUN


Category: drawing with the turtle

The commands in this category can be used to draw with the turtle on the graphics screen.

CLEAN

CLEARSCREEN;  CS

CS

ERASETURTLE;  ERTURTLE

ERTURTLE

FILL

PD

PE

PENDOWN;  PD

PENERASE;  PE

PENUP;  PU

PU

SETFC

SETFILLCOLOUR;  SETFC

SETFILLPATTERN;  SETFP

SETFP

SETPATTERN

SETPC

SETPENCOLOUR;  SETPC

SETPENWIDTH; SETPW

SETPW

SETSHAPECOLOUR

STAMP

TT

TTEXT;  TT


Category: working with the turtle

The commands in this category let you create, move and change turtles.

ALLTURTLES

ASK

BACK

CLEAN

CLEARSCREEN

DRAW

EACH

FORWARD

HEADING

HIDETURTLE

HOME

INSIDE?

LEFT

MAKETURTLE

OUTSIDE?

OVERLAP?

OVERLAPPED

POS

REORDER

RIGHT

SETPOS

SETHEADING

SETSHAPE

SETSHAPECOLOUR

SETX

SETXY

SETY

SHOWN?

SHOWTURTLE

TELL

TOUCHED

TOWARDS

WHO

XCOR

YCOR


Category: working with images and frames

Procedures of this category work with images (frames) of turtles.

FRAME

SETFRAME

SETFRAMEMODE

SETSHAPE


Category: working with the screen

This category includes commands to change the SuperLogo screens. These procedures clean both screens, set the colours of their backgrounds, show and hide Speed Bar etc.

CLEAN

CLEARSCREEN;  CS

CLEARTEXT;  CT

CS

CT

DRAW

GRAPHICSCREEN;  GS

GS

HIDEBUTTONS

HIDESPEEDBAR

LOADSCREEN

READLISTDIALOG

READLISTTURTLE

SETBACKGROUND;  SETBG

SETBG

SETBUTTONS

SETMC

SETMOUSECURSOR;  SETMC

SHOWBUTTONS

SHOWSPEEDBAR

SPLITSCREEN;  SS

SS

TEXTSCREEN;  TS

TS


Category: working with buttons

This category includes commands and operations which make it possible to open and close some of the Logo choosers and the Speed Bar directly from your program.

HIDEBUTTONS

HIDESPEEDBAR

SETBUTTONS

SHOWBUTTONS

SHOWSPEEDBAR


Category: working with the command screen

These commands help you do operations in the command screen.

CLEARTEXT

PL

PR

PRINT;  PR

PRINTLINE;  PL

SH

SHOW;  SH

SPLITSCREEN

TEXTSCREEN

TYPE


Category: working with files

Commands of this category allow to load and save images.

LOADSCREEN


Category: working with the mouse and the keyboard

These commands make it possible for turtles to react to clicking of the mouse buttons or make a program wait for a key to be pressed, etc.

ASCII

CHAR

CHOOSER

CODEAREA

KEY?

MOUSE

READCHAR

READKEY

READLIST

READLISTDIALOG

READLISTTURTLE

READWORD

SETMC

SETMOUSECURSOR;  SETMC

TOUCHED


Category: working with music

These commands allow you to make music

PLAY

PLAYW

PLAYWAVE;  PLAYW

SOUND


Drawing with the turtle

This command belongs to the category Drawing with the turtle.

See also:

Categories of procedures

Category: working with the turtle

Category: working with images and frames of turtles

Alphabetical list of procedures


Working with the turtle

This command belongs to the category Working with the turtle.

See also:

Categories of procedures

Category: drawing with the turtle

Category: working with images and frames of turtles

Alphabetical list of procedures


Working with images and phases of turtles
Working with images and frames of turtles

This command belongs to the category Working with images and frames of turtles.

See also:

Categories of procedures

Category: drawing with the turtle

Category: working with the turtle

Alphabetical list of procedures


Calculations

This command belongs to the category Calculations.

See also:

Categories of procedures

Category: working with numbers

Alphabetical list of procedures


Working with numbers

This command belongs to the category Working with numbers.

See also:

Categories of procedures

Category: Calculations

Alphabetical list of procedures


Operations for words and lists

This command belongs to the category Operations for words and lists

See also:

Categories of procedures

Alphabetical list of procedures


Logical operations

This command belongs to the category Logical operations.

See also:

Categories of procedures

Category: testing and editing of procedures

Category: working with procedures

Category: working with files

Category: creating and editing of variables

Alphabetical list of procedures


Testing and editing of procedures

This command belongs to the category Testing and editing of procedures.

See also:

Categories of procedures

Category: Logical operations

Category: working with procedures

Category: working with files

Category: creating and editing of variables

Alphabetical list of procedures


Working with procedures

This command belongs to the category Working with procedures.

See also:

Categories of procedures

Category: Logical operations

Category: testing and editing of procedures

Category: working with files

Category: creating and editing of variables

Alphabetical list of procedures


Working with files

This command belongs to the category Working with files.

See also:

Categories of procedures

Category: Logical operations

Category: testing and editing of procedures

Category: working with procedures

Category: creating and editing of variables

Alphabetical list of procedures


Creating and editing of variables

This command belongs to the category Creating and editing of variables.

See also:

Categories of procedures

Category: Logical operations

Category: testing and editing of procedures

Category: working with procedures

Category: working with files

Alphabetical list of procedures


Working with the screen

This command belongs to the category Working with the screen.

See also:

Categories of procedures

Category: working with buttons

Category: working with the command screen

Alphabetical list of procedures


Working with buttons

This command belongs to the category Working with buttons.

See also:

Categories of procedures

Category: working with the screen

Category: working with the command screen

Alphabetical list of procedures


Working with the command screen

This command belongs to the category Working with the command screen.

See also:

Categories of procedures

Category: working with the screen

Category: working with buttons

Alphabetical list of procedures


Working with the mouse and the keyboard

This command belongs to the category Working with the mouse and the keyboard.

See also:

Categories of procedures

Alphabetical list of procedures


Working with music

This command belongs to the category Working with music.

See also:

Categories of procedures

Alphabetical list of procedures


On Choosers
What are Choosers?

Choosers are special pop-up windows and dialogue boxes designed to facilitate your work in SuperLogo. They help you type in correct inputs, they provide you with different graphics and textual tools, hints and menus etc.

Each chooser belongs to a SuperLogo-command (sometimes more than one) and can be started in several ways:

in the command line. Type the name of the command and press Enter or F9,

in the Editor. Press F9 when you have typed the name of a SuperLogo-command.

If the command doesn't have a chooser, then the List of commands will be displayed on screen.

Some choosers wait until you click somewhere on the graphics-screen with the mouse, like the FORWARD command (the chooser is a ruler) and SETPOS.

Most choosers have their own dialogue. See the list of choosers.

In such a dialogue you type the input (e.g. a number or a name) and then you click one of the following buttons:

Do it copies the command together with the input to the command line and immediately executes it.

Write it writes the command together with the input to the line where the chooser was started from. The command isn't executed immediately.


See also...

What are choosers?


List of all choosers

SuperLogo contains the following choosers:

Turn

Play

Colours

Set Font

Line Patterns

Make Turtle

Choose an Image

Load Screen

Pen Width

Write a text

Play

Number of Steps

Fill Pattern

Set Mouse Cursor

Set Text Colour

Colours (16 colours only)

Setcommands


See also...

Buttons

List of commands

List of all choosers


See also...

What are choosers?

List of all choosers

List of commands


Buttons Window
Buttons Window	F10

The buttons can have commands or procedures attached. You can do this the following ways:

with the command SETBUTTONS.

clicking with the right mousebutton on a button. Then you can type the text to be put on the button.

With the SuperLogo command SHOWBUTTONS you can show the buttons on screen. You can hide them with the command HIDEBUTTONS.

The text on the buttons and wether or not they are hidden is saved in your project.


List of Commands Window

This is a window containing a list of SuperLogo's primitive commands. This list can be defined by a teacher or a parent with the SETLOGO command to help with using other procedures (especially by young users). It can be opened by pressing F9:

while typing Logo commands from a command line of the text screen, (see also Choosers). Here you can highlight a command and press either Do it! button or Write it! button. When Do it! button is pressed, a special chooser belonging to the selected command opens (if it exists). Here you enter the input(s) of the command and press the Do it! button. When the Write it! button is pressed instead, the selected command's name is typed into the command line. There you can specify its input or inputs by typing them in.

while typing in the Object Editor. (Here you can open it by choosing the Commands command as well.) You select a command name in the list of names and press either Inputs button or Write it! button. When Inputs button is pressed, a special chooser belonging to the selected command opens (if one exists). Here you specify the input or inputs of the command and press Write it! button - the command together with specified inputs are automatically written at the current text cursor location. When Write it! button is pressed, only the name of a command is written, so that you have to type its input or inputs into the editor.

  Speed Bar Button:

  Function Key:  F9


Chooser - Make Turtle
Make Turtle

This works with the command MAKETURTLE.

Click on a part of the chooser for more information:


Name

In this box you type the name of the new turtle. If the name already exists a new turtle will be created. This dialogue doesn't close until you have named the turtle.


Xcor, Ycor

In these two boxes you fill in the numbers X and Y which define the beginning position of the new turtle. If you use the chooser Make turtle from the Command-list these numbers will both be 0. If you open the chooser Make turtle by clicking with the right mousebutton in the graphics screen, the X- and Y values will correspond to the position you clicked..


Set Heading Button ...

opens Turn Chooser, in which you specify a new turtle's basic heading. This number is listed in the text box to the right of the button and can be also modified manually.


Set Shape... Button...

opens the Choose an Image chooser. Here you can choose any image to become the button's new shape. If you choose an image with only one frame or you select only one frame from an image, both positions of a button will have the same shape. If you choose two frames, these will appear on the button when it is released and when it is pressed. If you choose more frames, only first two will be taken.

The actual size of the button will be specified be the size of the image chosen (by its smaller frame, if they are not the same).


Pen down

The checkbox Pen down- if you uncheck this box then the new turtle's pen is up.


Show

The checkbox Show - if you uncheck this box then the new turtle is hidden,


Activate

The checkbox Make active - if this box is not checked, the new turtle will not be part of the active turtle list.


Set Frame Mode

The checkbox Set Frame Mode turns the turtle into an animated turtle.


Chooser - Choose an Image
Choose an Image

This chooser helps you to specify the input for the Logo procedure SETSHAPE.

Click on a part of the chooser for more information:


Image Overview

A list with an overview of all images.


Filetypes

This list shows the different filetypes that can be opened, like soundfiles (.wav) or bitmaps (.bmp).

Click on the list to change the type of files shown.


Directories

Clicking on the button Directories... allows you to open a different directory.


Checkbox Preview

Checking this box will show you a preview of all frames..


Checkbox Select Frame

This checkbox will allow you to choose a frame. You can select more frames by pressing  the Ctrl-key while selecting frames.


Do it!

The Do it! button writes the whole command to the text screen and executes it immediately.


Write it!

The Write it! button copies the command to the Editor. The command isn't executed at once.

Use the Do it! button to execute a command immediately.


Cancel

The Cancel button cancels all operations and closes the chooser.


Chooser - Turn
Turn

This chooser helps to specify the input to SETHEADING, LEFT and RIGHT commands. To choose a heading you can either type it into the text box or turn the red hand of the compass with the mouse.

Click on a part of the chooser for more information:


The Heading

Here you can set the heading in degrees.


The Compass

The compass shows the direction of the turtle.


Chooser Play
Play

Here you can define the following:

List: Here you can enter the notes and other symbols:

c d e f g a b c: 	these letters represent the notes

P:	this represents a pause


Chooser - Back or Forward
Number of Steps

This chooser belongs to the commands BACK and FORWARD.

Click on a part of the chooser for more information:


Number

Enter here the number of steps the turtle has to move.


Chooser - Colours
Colours

This chooser helps to specify the input to SETBACKGROUND, SETFILLCOLOUR and SETPENCOLOUR commands. To choose a colour, you can either type its number into the text box, click a colour in the palette or create it by specifying its R, G and B components.

Click on a part of the chooser for more information:


Colours

Click on the colour you want to use.


Colour number
Colour numbers

Each colour has a number. Here you can type that number.


Scrollbars

The scrollbars allow you to mix colours.


Colour sample

Colour sample.


Play Wave

This chooser helps to specify the input to PLAYWAVE command.

Click on a part of the chooser for more information:


Play It!

Click on this button to play the selected file.


Set Font

This chooser helps to specify the inputs to SETTTEXT command. It also allows you to preview actually selected font.


Sample

Here a sample is shown of the selected font and style.


Fill the Background Colour

If you check this box the background will be filled with the background colour.


Turtle on the Base Line

If you check this box the text will be printed at the same height as the turtle.


Size

Here you can choose the size of the font. 10 is a small letter; 36 a big letter and 72 a huge letter.


Style

This list contains the styles for the selected font, like Bold, Italic and Bold Italic.


Font

This list contains all available fonts.


Line Patterns

This chooser helps to specify the input to SETPATTERN command.

Click on a part of the chooser for more information:


Line Pattern

The arrow points to the chosen Line Pattern


Line Pattern Number

This number represents the Line Pattern (a number between 0 and 4).


Chooser - Load Screen
Load Screen

This chooser helps to specify the input to LOADSCREEN command.

Click on a part of the chooser for more information:


Preview Box

In this box a preview is shown of the selected image when the checkbox Previews has been checked.


Preview

If this box is checked a preview of the selected image will be shown in the preview box.


Drive

This list contains all available drives.


Directories

This list contains all available directories on the selected drive.


Filelist

This list contains all files of the selected filetype in the selected directory.

You can open a file from this list in two ways::

Click on the name of the file and then click on Do it!.

Double-click on the name of the file.


Filename

This is the filename of the selected file


Pen Width

This chooser helps to specify the input to SETPENWIDTH command. To choose a pen width, you can either type its number into the text box or click a line in the pen width menu box.

Click on a part of the chooser for more information:


Sample Penwidth

This is a sample of the chosen penwidth.


Penwidth

The arrow points to the chosen penwidth.


Penwidth Number

This number represents the penwidth.


Chooser - Write Text
Write Text

This chooser helps to specify the inputs to TTEXT command. It also provides a preview of the selected text to be typed by each active turtle in the selected font, size and style (of the first active turtle).

Click on a part of the chooser for more information:


Top Box

Type the text to be printed here.


Bottom Box

Preview of the text


Chooser - Fill Patterns
Fill Patterns

This chooser helps to specify the input to SETFILLPATTERN command. To choose a fill pattern, you can either type its number into the text box or click a pattern in the pattern menu box.

Click on a part of the chooser for more information:


Fillpattern

The arrow points to the selected fillpattern.


Fillpattern Number

This number represents the selected Fillpattern (a number between 0 and 15).


Chooser - Set Text Colour
Set Text Colour

This chooser helps to specify the input to SETTC command.

Click on a part of the chooser for more information:


Backgroundcolour

Click on the background colour for the text. The selected colour is surrounded with a box.


Text colour

Click on the colour for the text.

The selected colour is surrounded with a box.


Sample text colour

Here a sample is shown of the text with the selected colour and background.


Text colour Number

This number represents the selected text colour (a number between 0 and 255).


Chooser - Colours (16 colors)
Colours (16 colours only)

This chooser helps to specify the input to SETSHAPECOLOUR command. To choose a colour, you can either type its number into the text box or click a colour in the palette.

Click on a part of the chooser for more information:


Kleuren
Colours

Click on the colour of the turtle that has to get the pencolour.

When the colour of the pen changes this colour will change too.

If you choose green here and the pencolour is black then all the green in the turtle will turn black..


Chooser - Set Mouse Cursor
Set Mouse Cursor

This chooser helps to specify the input to SETMOUSECURSOR command. A slightly modified Choose an Image chooser opens. The mouse cursor must be black and white (and transparent and reverse) and not bigger than 32 x 32 pixels, Preview of this modified chooser already depicts it reduced to meet these restrictions.

Click on a part of the chooser for more information:


Testen
Test the Cursor

This checkbox will change the cursor with the selected image.


Chooser Setbuttons

This chooser can be used to define new buttons.

See the command SETBUTTONS.

Click on a part of the chooser for more information:


OK

If everything is entered correctly click on OK.


Text

Type the text here that has to appear on the button.


Commands

Here you can type the SuperLogo commands or the name of a procedure.


Options


Text

You want buttons with text on them.


Graphic


Hidden

The button is removed from the bar. You will loose the button!


Xcor

The X-position of the button on the bar. The number -1 is completely to the left.


Ycor

The Y-position of the button on the bar. The number -1 completely to the top.


Width

The size of the button measured in points.


Height

The height of the button measured in points.


Left box

This is how the button looks.


Right Box

This is how the button looks when it is pressed.


Set Shape...

Press this button to choose an image (turtle) for the button.


Edit shape...

Start MegaPaint to edit the image.


Make Frame

Changes the image in a real button with a frame.


Chooser available...

This command has a chooser.

Chooser Make turtle

What are choosers?


Chooser available...

This command has a chooser.

Chooser Choose an Image

What are choosers?


Chooser available...

This command has a chooser.

Chooser Turn

What are choosers?


Chooser available...

This command has a chooser.

Chooser Play

What are choosers?


Chooser available...

This command has a chooser.

Chooser Forward or Back

What are choosers?


Chooser available...

This command has a chooser.

Chooser Colours

What are choosers?


Chooser available...

This command has a chooser.

Chooser Playwave

What are choosers?


Chooser available...

This command has a chooser.

Chooser Set Font

What are choosers?


Chooser available...

This command has a chooser.

Chooser Line Pattern

What are choosers?


Chooser available...

This command has a chooser.

Chooser Load Screen

What are choosers?


Chooser available...

This command has a chooser.

Chooser Pen Width

What are choosers?


Chooser available...

This command has a chooser.

Chooser Fill Pattern

What are choosers?


Chooser available...

This command has a chooser.

Chooser Set Textcolour

What are choosers?


Chooser available...

This command has a chooser.

Chooser Ttext

What are choosers?


Chooser available...

This command has a chooser.

Chooser Set Shapecolour

What are choosers?


Chooser available...

This command has a chooser.

Chooser Set Mousecursor

What are choosers?


Chooser available...

This command has a chooser.

Chooser Setbuttons

What are choosers?


Text in a Button ...

is any text which will appear on the button. Its size is limited by the size of the button. For example, Move, MOVE IT!, go ahead are correct examples.

This text may also be an instruction or instructions to be evaluated whenever the button is pressed. In this case it is not necessary to specify the Commands: edit line. For example, fd 40 rt 90, clearscreen, HOME or even FD without an input are correct texts. Last example - FD without the input will open corresponding chooser, when the button is pressed.


Commands:  ...

This line specifies what should happen when the button is pressed. It may be either a complete Logo instruction or even several instructions together with the expressions specifying the inputs, or the incomplete instruction, that is, the name of a procedure which opens a chooser.


OK Button ...

closes the dialogue and makes Logo accept all selections and settings done in it.

Alternative: press Enter key on the keyboard.


Cancel Button ...

closes the dialogue without accepting any selections and settings changed in it.

Alternative: press Esc key on the keyboard.


Button Type ...

can be either textual, graphical or hidden.

If you choose Text, you will see four edit lines in which you can specify the size and the position of the button.

If you choose Graphic, you will see two lines to specify the button's position and two small windows to inspect the button's actual size and shape.

If you choose Hidden, you will see four edit lines to specify the size and the position of the button.


Button Position ...

is specified by the X and Y co-ordinates of the button's upper left corner relative to the Buttons Window. The default position of the first (top most) button is [-1 -1].

If you specify a position which places the button completely out of the Buttons Window, you have to use the SETBUTTONS command to get it back.


Two Images Associated with a Button ...

Two small windows preview the actual shape associated with the button. The left one shows the released button's shape, the right one shows the pressed button's shape. If no image has been specified so far, both inspection windows are dark grey and the button is not defined.

The actual size of the button is specified by the size of the image associated with it.


Edit Shape... Button...

Opens MegaPaint with the shape (two frames) of the graphical button. You can modify the image there to change the actual button's shape.


Make Frame Button ...

Adds button-like frames around both frames of the actual button's shape. The left one represents released button, the right one pressed button. The size of the button will fit the actual size of the button's shape.


Do it! Button

Transforms all selected information from the graphical representation of the chooser into the Logo language instruction. Copies this text into the command line and adds the Enter key. That is, Do it! button also makes Logo immediately evaluate the complete Logo instruction/instructions typed in the command line. The chooser is immediately closed.


Write it! Button

Transforms all selected information from the graphical representation of the chooser into the Logo language instruction. Copies this text into the line (either command line or a line in the Object Editor) from where you opened the chooser. The chooser is then closed. The instruction/instructions are not immediately evaluated.


Cancel Button ...

If you opened the chooser by pressing Enter key (that is, after typing the name of a procedure in the command line), Cancel button will close the chooser and will also delete the name of a procedure from the command line.

If you opened the chooser by pressing F9 function key, Cancel will only close the chooser (deleting nothing).

Alternatives: Esc or Alt+F4


Help Button ...

Opens the page of Help describing in detail all parts of the whole dialogue. To find any detail, just click the list boxes, buttons and check boxes of the dialogue with the mouse.


Chooser Control Menu ...

is a reduced control menu. It contains only two commands:

Move

Close     Alt+F4


Play it! Button ...

If you have a sound card installed in your computer (or SPEAKER.DRV) and you press this button, the selected .WAV file is played.


Directories Button ...

opens the list of directories and the list of drives. The Directories... button then becomes disabled. In Drives drop down list you select the drive that contains the file you are looking for. In Directories list you select the directory that contains this file by double clicking it. Above the Directories list, the actually selected path is shown.


Ruler ...

allows you to choose the proper number of steps within the range -200 to 200. The ruler always opens at the position of the first active turtle, having the same heading.


Number of Steps ...

is a small window displaying the number of steps from the turtles position to the mouse cursor position (if it is inside the ruler).


The Turtle ...

This is an example of the turtle. The ruler always opens in the same direction as the actual heading of the first active turtle.


Mouse Cursor ...

This is the actual shape of the mouse cursor until you choose.


Number of Line Pattern...

This is a text box which contains an integer between 0 and 4, inclusive, specifying which line pattern an active turtle should use for drawing.

You can either  type the number of line pattern or choose one from the box below. In this case Logo automatically updates the number of the pattern in this box.


Line Patterns Menu...

Here you can click a pattern which you want to choose for the turtle's pen. You can also choose it by pressing Up or Down arrows.


Colour Number ...

Here you can either type or read the number of the selected colour.


Palette of 16 Basic Colours...

This is the palette of 16 basic solid colours. To choose any of them, click it or select it by pressing Up, Right, Left and Down arrows on the keyboard to move the selection frame.


Specifying RGB Colour...

To specify a colour as a list [R G B] of three numbers, you can use these three horizontal scroll bars.


Colour Preview...

In this box you can see the selected colour.


Basic Colour Number...

Here you can either type or read the number of the selected basic solid colour, that is, a number between 0 and 15.


Pen Width Number...

Here you can either type or read the number of the selected pen width. The number typed in here need not necessary be one of 1, 2, 3, 5, 7, 10 and 15, which are pen widths displayed in the pen width menu box below.


Pen Widths Menu...

Pen widths are displayed here: 1, 2, 3, 5, 7, 10 and 15. To choose any of them, click it or select it by pressing Up and Down arrows on the keyboard to move the selection icon.


Pen Width Preview...

Here you can see the width of the pen. Notice that lines drawn by the pen width bigger that 5 have rounded ends.


Compass...

Here you can specify a turn. The red hand of the compass can be either dragged from inside the dial or from outside. In this case only exact multiples of 45 degrees can be chosen.

When the chooser opens in the screen, the red hand of the compass shows either:

turtle's basic heading, if you have opened the chooser through Turtle: Change Me command or through Make Turtle Chooser,

turtle's actual heading, if you have opened the chooser through RIGHT or LEFT Logo primitive commands. However, the compass is adjusted here in such a way that this direction is marked 0 degrees. This is natural because here you want to specify an angle to be turned right or left from this actual heading,

turtle's actual heading, if you have opened the chooser through SETHEADING command. However, 0 degrees is adjusted to North in this case.


Fill Pattern Number ...

Here you can either type or read the number of the selected fill pattern; a number between 0 and 6.


Fill Patterns Menu ...

This is the menu of 7 basic fill patterns. To choose any of them, click it or select it by pressing Up, Right, Left and Down arrows on the keyboard to move the selection frame.


Coordinates of the Point ...

In this small window you see the actual position of the mouse cursor within the graphics screen. Origin of the screen - the point [0 0] is located in the centre of the graphics screen.


Mouse Cursor ...

This is the actual shape of the mouse cursor until you specify the point in the graphics screen by clicking it.


Four Numbers ...

specify a rectangle of the form [X Y width height].


Clipping Rectangle ...

is the bordered area in the graphics screen specified by clicking its upper left corner and dragging the mouse cursor to its lower right corner.


Cross Hair Mouse Cursor ...

This is the actual shape of the mouse cursor until you specify the rectangle in the graphics screen


List Box with All Frames ...

contains numbered frames of the actual shape of the active turtle. You can select any of them - either by clicking the frame and pressing the button Do it! or Write it!, or by double clicking it.


First Input ...

is any correct Logo expression which outputs a value. Do not forget that this expression is evaluated first then its value is passed to the procedure as its first input.


Second Input ...

is any correct Logo expression which outputs a value. Do not forget that this expression is evaluated first and then its value is passed to the procedure as its second input.


Image Chosen From ...

here you see whether the selected image comes from the .LGW file (from image library) or from Logo Memory.


From Image Library: ...

is a list box containing all images saved in the specified directory. Each image you see here is the first frame of an image saved in the .LGW file. The name of a file (without the extension) appears beneath the image in the same frame. To see all frames of an image, click it and check the Preview check box below.


From Memory: ...

is a list box containing all image variables actually contained in the Logo Memory Window. Each image you see here is the first frame of an image value associated with the variable named beneath. To see all frames of an image, click it and check the Preview check box below.

Buried variables are not listed here, unless they are made temporarily visible by SETBURY Logo command or by Objects Menu Show Also Buried command.


Preview Region ...

contains two check boxes: Preview and Select Frame and a list box. If you check Preview, all frames of the selected image are shown in the list box. The frames are numbered. If you also check Select Frame box, you can restrict your selection to one or several frames of the image.


File Name and File Name List ...

Here you select or type the name of the file you want to open or save. This box lists all files with the filename extension selected in the List Files Of Type or Save File as Type box. To see a list of files with a particular extension, you can type an asterisk (*), a full stop, and the extension, and then press Enter. To see files with more than one filename extension, you can type a semicolon (;), a second asterisk (*), a full stop, and another extension. For example, if you want to see all files with the .BMP extension and all files with the .LGP extension, you will type *.bmp;*.lgp.


List Files of Type: ...

opens a drop-down list box with only one type: Wave Files (*.wav).


Directories and Drives...

Here you select the directory that contains the file you want to open. It is also possible to change the drive that contains the file you are looking for.


Font:

In this list box you choose which font should be used by all active turtles to type later in the graphics screen with the Logo TTEXT command.

The actual list of fonts depends on the Windows installation and can be modified by running Control Panel/Fonts application.


Font Style: ...

Here you select a style for the selected font. Most often, you can choose one of the following types: Regular, Italic, Bold and Bold Italic.


Size: ...

Here you can type or select a size. The sizes listed in the list box depend on the printer and selected font. If the size you type is not available on the current printer, Windows chooses the closest available size.


Sample ...

Here you can inspect the effects of your choice.


Text Line ...

is a one line box in which you type the text you want all active turtles to type in the graphics screen. This text cannot contain Enter codes - it always goes into one line. The length of text is limited by the size of this box.


Text Preview ...

Here you see how the text specified above would look if actually typed in the graphics screen by the first active turtle- in its actual font, size and style.


Name of the Turtle ...

In the text box here you specify a new turtle's name, which may be any SuperLogo word. If a turtle with that name already exists, it will be redefined. Logo will not allow you to close the window by creating a turtle without a name


Home Position ...   Xcor, Ycor text boxes:

These are two numbers X and Y specifying new turtle's home position. If Make Turtle Chooser is opened through the List-of-Commands Chooser or by pressing F9, these numbers are initially 0 and 0. If you open Make Turtle Chooser from the right mouse button shortcut menu in the graphics screen, X and Y listed in the dialogue represent a point where the click took place. Both of these numbers can be modified in their text boxes.


Four Check Boxes ...

Here you specify following settings:

Pen Down check box: if it is not checked, new turtle's pen will be up,

Show Turtle check box: if it is not checked, new turtle will be hidden,

Make Active check box: if it is not checked, new turtle will not be included among active turtles,

Set Frame Mode check box: if checked, the turtle will not use standard mechanism for depicting its heading through the corresponding frame, see SETFRAME command.


Set Shape Button ...

opens Choose an Image chooser, in which you select one of the displayed images as a new shape for the turtle. It is immediately displayed in the small preview box to the right of the Set Shape button.


Shape of the Turtle ...

This is a small preview window in which you see first frame of the turtle's shape. If you double-click the window, MegaPaint opens with this image ready to be modified.

If the shape is identical to the basic (default) turtle's shape, the Editor is activated with no image opened to be modified.


Number Code ...

Here you can type or read the number of text screen colours actually selected in both palettes. It is an integer of the form 16*X + Y (both X and Y are integers between 0 and 15, inclusive), where X indicates selected colour of the text screen background and Y indicates selected colour of the text itself.


Palette For Text ...

This is the palette of 16 basic solid colours from where you can choose one for the text in the text screen. To choose any colour, click it or select it by pressing Up, Right, Left and Down arrows on the keyboard to move the selection frame.


Text Screen Preview ...

This box lets you see how the selected text screen colours look.


Palette For Background ...

This is the palette of 16 basic solid colours from which you can choose one for the background of the text screen. To choose any colour, click it or select it by pressing Up, Right, Left and Down arrows on the keyboard to move the selection frame.


Instruction/Instructions Text Box ...

Here you type one or more Logo instructions to be debugged.


Save File as Type: ...

SuperLogo can save screens in two different formats: either as a .BMP file or as an integral part of a .LGP Logo project.

  See also SAVESCREEN Logo primitive procedure


List Files of Type: ...

opens a drop-down list box with two alternatives: Bitmap Files (*.BMP) and Logo Project Files (*.LGP).


Screen Preview ...

If you select the Preview check box, and any .BMP file or .LGP file is actually selected, a preview of the corresponding screen is displayed here.


Preview of the Cursor ...

contains two check boxes: Preview and Select Frame and a list box. If you check Preview, all frames of the selected image are show in the list box, however they are first reduced to black and white (and transparent and reverse) colours and to the size not bigger that 32 x 32 pixels.

If you also check Select Frame box, you can restrict your selection to one or several frames of the image. If you select only one frame, it will be used to depict the mouse in the graphics screen. If you choose more frames, only the first two of them will be accepted. The second frame will appear at the mouse pointer when its left button is pressed.


Meer over...
More about...

More information about Object Menu Commands of the Memory window.


Add Procedure...
Add Procedure	Ctrl+P

This helps you create a new user defined procedure. A dialogue box opens in the screen asking for the name of the new procedure. The name must be different from all Logo primitive procedures and from all currently existing user-defined procedures. After you type it in and press the OK button, the following things happen:

new object with [image] icon appears in the List of Objects,

new inspection window opens. It contains only a heading line and the end line,

Edit command is automatically selected for this object, so that the Object Editor opens and is ready for creating new procedure.

To close the Object Editor, you have to either double-click the editor's control menu icon, press F12, or select End Editing command.

Shortcut Key: Ctrl+P

SuperLogo Language: EDIT or TO


Add Variable...
Add Variable	Ctrl+R

This command allows you to create a variable. A variable has a temporary value that can be changed whenever you want. Depending on the kind of variable either the Object Editor opens or MegaPaint.


Add Property...
Add Property

This is a difficult command and isn't

explained in the Help for Kids


Open Object
Open Object	Enter

If an object is selected in the List of Objects and you choose the Open Object command, the object's inspection window opens in the Inspection Area of the Memory Window. If more objects are selected, the same is done for all of them. When the object's inspection window opens, a small light in its icon in the List of Objects turns yellow: , [image] or [image].

Shortcut Key: Enter

Mouse Shortcut: double-click the object and it opens


Close Object
Close Object	Ctrl+Enter

All selected inspection windows are closed; they disappear from the Inspection Area of the Memory Window. (However, they continue to be displayed in the List of Objects ; closing them doesn't mean deleting them!)

When the object's inspection window is closed, the small light in its icon in the List of Objects turns grey: , [image] or [image].

Shortcut Key: Ctrl+Enter

Mouse Shortcut: double-click the object's name in the List of Objects or click the icon in the title bar of the inspection window


Close All

All inspection windows are closed, that is, they disappear from the Inspection Area of the Memory Window. (However, they continue to be displayed in the List of Objects ; closing them doesn't mean deleting them!)

When the object's inspection window is closed, the small light in its icon in the List of Objects turns grey: , [image] or [image].


Edit
Edit	F11

Opens MegaPaint if the object to be edited is an image variable, or the Object Editor if the object is a text variable, a procedure, or a word with defined properties.

When the object is going to be edited, a small light in its icon in the List of Objects turns red: .

However, the Edit command is disabled any time there are more objects selected in the List of Objects.

Function key:	F11


End Editing
End Editing	F12

Finishes editing of the object and closes the Editor Window.

If the edited object is a procedure definition, its structure is checked for errors first, see also:

Parts of the Procedure's Definition

If the structure is not correct, an error message is displayed and you are not allowed to finish the object's editing before you fix it.


Bury

This is a difficult command and isn't

explained in the Help for Kids


Unbury

This is a difficult command and isn't

explained in the Help for Kids


Show Buried
Show Also Buried

This is a difficult command and isn't

explained in the Help for Kids


Open Below Others

When this option is checked the inspection window will open in the inspection area. This option will be turned off, if you select Open on the Top command.


Open on the Top

When this option is checked the inspection window will open on top in the inspection area. This option will be turned off, if you select Open below Others command.


New (in the Memory Window)
New

If there are any user-defined objects in the Memory, this command brings up a warning box asking: "Do you want to remove everything in the Memory?" If you choose Yes, all objects in the Memory are removed, both graphics screen and text screen are cleared and Logo resets as if it were just started - it is ready to start a new project.


Open... (in the Memory Window)
Open...

Used for opening procedures.


Save Selected Objects As...

Use for saving all currently selected user-defined objects of the Memory Window into a project.

Opens Save Selected Objects As... dialogue box with following options:

Project Name - Here you specify the filename to save a project as. You can either type the name in the Project Name text box, or use the current name, or select a name in the list box of projects,

Save File As Type - Currently lists only Logo Project Files (lgp.*) type, i.e. .LGP extension and Logo Program File (*.lgo),

Drives - Here you select the drive on which Logo will store the project you are saving,

Directories - Here you select the directory in which Logo will store the project you  are saving. The directory displayed initially is the work directory.


Print Objects...

Allows you to print the contents of any object / objects from the Memory Window. Opens Print Objects from the Memory Window dialogue with the following options:

Which Objects - here you specify Procedures, Variables and Properties,

Range - either all objects or only those that are currently selected in the List of Objects,

Print to File, Printer, Number of Copies, Resolution

Collate Copies - will print copies organised in page number order,

Titles & Icons - will print a title line for each printed object together with its name and icon,

Options Button - opens Print Setup dialogue box in which you specify the Orientation, Printer, Size of Paper, and more Options depending on your printer type,

Margins Button - specifies Top, Bottom, Left, and Right margins of a printed page, plus Measurement Units (in centimetres or inches)


Close Memory
Close Memory	F4, Ctrl+F4, Alt+F4

Closes the Memory Window.

Shortcut:	F4, Ctrl+F4, Alt+F4


Next Window
Next Window	Ctrl+F6

Sometimes you have more than one window open within SuperLogo, for example, the Memory Window, one or even more Windows with Problems to be solved, File Editor Window etc. The Next Window command switches from one to another - it helps to organise all the windows in the Logo Main Window.

Memory Window is always the first one to be switched to after selecting the Next Window command (if it is active).

Function key:	Ctrl+F6


Inspection Window

It is a window which displays the contents of an object, that is:

an image with all its frames, if the object is an image variable,

a word or a list, if the object is a Text variable,

a procedure definition, if the object is a procedure,

The inspection window is only for inspecting object's contents. If you want to modify it, you have to start the Object Editor.


More about...

More information about the inspection-area of the memory.


More about...

More information about File Menu Commands in the Memory window.


File Menu Commands (in the Memory Window)

The commands in this menu allow you to remove all objects from the SuperLogo memory, open a project etc.

Commands

New

Open

Save Selected Objects as

Print Objects

Close Memory	Ctrl+F4

Next Window	Ctrl+F6


Objects Menu Commands
Objects Menu Commands (in the Memory Window)

Commands of this menu allow you to create new objects, to inspect and modify them in the Object Editor.

You need to know how to browse through the list of commands and how to select them.


More about...

More information about commands in the Memory window.


Options Menu Commands
Options Menu Commands (in the Memory Window)

With the commands in this menu you choose the place in the inspection area where selected objects will open.

Commands

Open Below Others

Open on the Top


More about...

More information about Options Menu Commands of the Memory window.


More about...

More information about parts of the Memory window.


More about...

More information about the List of Objects in the Memory window.


List of Objects

This displays the names of all user-defined objects which have either been:

loaded into Logo memory,

created by running a Logo program or SuperLogo command, see TO,

created directly within the Memory Window.

All names in the list are sorted by their type (procedures, variables, properties) and within the group listed alphabetically. If there is a procedure named Startup actually in Logo memory, it is listed as the first object of the list. Each name is accompanied by an icon showing the object's type:

for procedures

for variables

for words with defined properties.

Note that there may be two objects with identical names and of different types: for example, procedure F111 and variable F111. A small light to the right of the icon is yellow, [image] if its object is actually open in the inspection area as a separate inspection window. The light is red, [image] if the object is currently being edited either in the Object (text) Editor or MegaPaint. Otherwise the light is grey.

How to browse through the list of objects

Selecting Objects

What you can do with selected objects


How to Navigate Through the List of Objects
How to Browse Through the List of Objects

The dotted rectangle in the List of Objects is called the selection cursor. You can move it through the List of Objects:

with the mouse: click on any object in the list and the selection cursor will move to it,

if the List is too long to fit into one screen, a scroll bar appears on its right side. With the mouse you can scroll through it and click on any of the objects,

Up arrow: moves the selection cursor up one object,

Down arrow: moves it down one object,

Page Up: moves it up by one screen,

Page Down: moves it down by one screen,

Home: moves it to the first object,

End: moves it to the last object,

any letter: the selection cursor jumps to the next object beginning with that letter.


Selecting Objects

In the List of Objects you can select several objects at once. Selected objects are highlighted. You can do it in several ways:

A. Using the keyboard:

if you want to select a continuous group of objects, you can move the selection cursor until you highlight the first object in the group. Then you hold down Shift key while pressing the arrow keys until you move to the last object in the group,

if you want to select a split group of objects, you move the selection cursor until you highlight one object of the group, then you press Shift+F8 - this will cause the selection cursor to blink. Then you use arrows or other shortcut keys to move the selection cursor to the next item in the group. There you have to press Spacebar to select the object. You repeat this procedure until all objects you want in the group are highlighted. Then you press Shift+F8 once more to finish selection by the keyboard.

B. Using the mouse:

to select, simply click the object,

if you want to select a continuous group of objects, click on the first object in the group, hold down the Shift key, and click on the last object in the group (or, in a reverse order),

if you want to select objects that are split, click one of them, then press and hold down the Ctrl key while clicking each object in the group. (If you select wrong object, you click it once more - while still pressing down Ctrl key.)


Things you can do with Selected Objects
KThings you can do with Selected Objects

You can apply different commands to selected objects in the List of Objects:

Open Object's Inspection Window

Close Object's Inspection Window

Edit an Object

Delete Objects

Create a New Procedure, Variable, or Property


Open Object's Inspection Window...

Open an object's inspection window in the inspection area of the Memory Window. The inspection window contains either the object's value - if it is a variable, its definition - if it is a procedure, or its property list - if it is a word with defined properties. When the object's inspection window is open, a small light in its icon in the List of Objects turns yellow: , [image] or [image].

Menu command: Open Object

Mouse Shortcut: double-click the object in the List of Objects,

Shortcut Key: Enter


Close Object's Inspection Window...

Close the object's inspection window so that it disappears from the inspection area of the Memory Window. When it is closed, the small light in its icon in the List of Objects turns grey: , [image] or [image].

Menu command: Close Object

Mouse Shortcut: double-click the object's name in the List of Objects,

Mouse Shortcut: click the icon in the inspection window's title bar

Shortcut Key: Ctrl+Enter


Edit an Object...

You can edit the value of the object (for variables), its definition (for procedures), or its property list (for words with properties). You can do it either in MegaPaint if the object is an image variable, or in the Object Editor . When the object is being edited, a small light in its icon in the List of Objects is red: , [image] or [image].

Menu command: Edit,

Mouse Shortcut:  double-click the working area of the inspection window if it is currently open,

Shortcut Key:  F11 in Memory Window if one object is selected

To finish editing and return to the object's updated inspection window, press F12 or close the Editor Window.


Delete an object

You can delete a selected object from the SuperLogo memory.

Shortcut Key:	Del


Create a New Procedure, Variable, or Property...

This command allows you to write a new procedure, a user defined object.

When you type a name for your procedure and click OK:

a new icon will apear in the List of objects:

the inspection window will open with only a headline and an END line,

the Editor will be started so you can write your procedure.

Shortcut:	Ctrl+P

SuperLogo Language:	TO (even when the memory window is closed)


Inspection Area

The Memory Window is a split window with a vertical line which divides it into the List of Objects at the left and the Inspection Area at the right. The dividing line can be dragged by the left mouse button.

The Inspection Area itself is either empty (if no object is actually open), or contains objects' inspection windows. These can be dragged with the mouse along the Inspection Area, and closed by Close Object command.


Primitive Procedure - .CLEANMEM
.CLEANMEM

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - *
number1 * number2

number1*number2

effect:	multiplies two numbers. You can put a space between the number and the multiplier, but it is not necessary.

The sign * is the same as the SuperLogo-command PRODUCT, which can be placed in front of the two numbers.

Example


See also....

PRODUCT

+

-

/


Primitive Procedure - +
+

number1 + number2

number1+number1

+number1

effect:	adds up two numbers. You can put a space between the number and the + , but it is not necessary.

To add up two numbers you can also use the SuperLogo-command SUM. This command should be placed in front of the numbers.

The sign + can also be used to add a number to something else, for example a variable.  The sign + can also mean that the number is positive (greater than 0).

 	Example


See also...

SUM

-

*

/


Primitive Procedure - -
-

number1 - number2

number1-number2

-number1

effect:	Outputs the difference between number1 and number2.

 	Example


See also...

DIFFERENCE

+

*

/


Primitive Procedure - /
/

number1 / number2

number1/number2

effect:	Outputs number1 divided by number2. Division by zero causes an ERROR. Note the difference between / and DIV operation, which outputs integer division of its inputs.

 	Example


See also...

QUOTIENT

+

*

-


Primitive Procedure - <
<

number1 < number2

number1<number2

effect:	Outputs TRUE, if number1 is less than number2. Otherwise the output is FALSE.

 	Example 1

 	Example 2

More examples

About the order of predicates


Zie ook...
See also...

<=

=

>=

>

<>

GREATER?

LESS?


Primitive Procedure - <=
<=

number1 <= number2

number1<=number2

effect:	Outputs TRUE, if number1 is less than or equal to number2. Otherwise the output is FALSE.

About the order of predicates


See also...

<

>

=

>=

<>

GREATER?

LESS?


Primitive Procedure - >
>

number1 > number2

number1>number2

effect:	Outputs TRUE, if number1 is greater than number2. Otherwise the output is FALSE.

 	Example 1

Example 2

About the order of predicates


See also...

<

<=

=, >=

<>

GREATER?

LESS?


Primitive Procedure - >=
>=

number1 >= number2

number1>=number2

effect:	Outputs TRUE, if number1 is greater than or equal to number2. Otherwise the output is FALSE.

Note that the name of the operation >= is one word in SuperLogo, therefore you can't put a space between > and =..

Example


See also...

<

<=

=, >, <>

GREATER?

LESS?

About the order of predicates


Primitive Procedure - <>
<>

number1 <> number2

number1<>number2

effect:	Outputs TRUE, if the first input is different from the second one. Otherwise the output is FALSE.

Note that the name of the operation <> is one word in SuperLogo, therefore you can't put a space between < and >.

Example


See also...

<

<=

= , >

>=

GREATER?

LESS?

About the order of predicates


Primitive Procedure - =
=

input1 = input2

input1=input2

effect:	If both inputs are numbers, the output is either TRUE or FALSE depending on whether they are equal.

Example 1

Example 2


See also....
See also...

EQUAL?


Primitive Procedure - ABS
ABS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - ALLTURTLES; ALL
ALLTURTLES	ALL

ALLTURTLES

effect:	Outputs the list of all currently existing turtles, i.e. turtles, which you have created using the MAKETURTLE command.

Example

Do not confuse this list with the output of the WHO operation, which outputs the list of all currently active turtles - some or all of the currently existing turtles may not be active at the moment.

More examples


See also....
See also...

ASK

EACH

MAKETURTLE

ERASETURTLE

REORDER

TELL

WHO


Primitive Procedure - AND
AND

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - APPEND
APPEND

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - ARCTAN
ARCTAN

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - ASCII
ASCII

ASCII character

effect:	Outputs the numeric ASCII code (that is, an integer between 0 and 255, inclusive) corresponding to the input character, or to the first character of the input word.

Example


See also...

CHAR

READKEY

READCHAR


See also....

ALLTURTLES

EACH

MAKETURTLE

TELL

WHO


Primitive Procedure - ASK
ASK

ASK [turtles] [commands]

effect:	If the second input to ASK is a list of instructions to be executed, ASK is a command. If the second input is a list consisting of an expression (which outputs a value), ASK is an operation.

If ASK is a command, turtles named in the first input will execute instructions given in the second input. These turtles can be either active or not - they are temporarily activated for the time required to execute the list of instructions. All turtles named in the first input execute the list of instructions in "parallel" - while the EACH command would make all currently active turtles perform it one at a time. When ASK is completed, the list WHO of currently active turtles is restored.

Example

If ASK is an operation, the turtles named in the first input become temporarily active and the second input is evaluated - the result of the expression will become the output of the operation.

When the ASK operation is completed, that is, when it outputs the result, the WHO list of currently active turtles is restored.


Primitive Procedure - BACK; BK
BACK	BK

BACK number

effect:	Moves all currently active turtles the given number of steps (that is, pixels) in the opposite direction they are heading. Depending on the mode PENUP, PENDOWN, PENERASE or PENREVERSE of each turtle's pen, it either doesn't draw a line, draws a line (in currently set colour, width and pattern), erases a line or reverses a line.

Example


See also...

FORWARD

SETHEADING

SETPOS

RIGHT

LEFT

TOWARDS

SETX

SETY

SETXY


Primitive Procedure - BACKGROUND; BG
BACKGROUND	BG

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - BURIED
BURIED

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - BURY
BURY

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - BURYALL
BURYALL

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - BUTFIRST; BF
BUTFIRST	BF

BUTFIRST input

effect:	If the input is a word, BUTFIRST outputs a word containing all but its first character. If the input is a list, BUTFIRST outputs a list containing all but its first member. If the input is an image, BUTFIRST outputs an image containing all but its first frame

Example

About the order


See also...

BUTLAST

FIRST

FPUT

LAST

LPUT


Primitive Procedure - BUTLAST; BL
BUTLAST	BL

BUTLAST input

effect:	If the input is a word, BUTLAST outputs a word containing all but its last character. If the input is a list, BUTLAST outputs a list containing all but its last member. If the input is an image, BUTLAST outputs an image containing all but its last frame.

Example

About the order


See also...

BUTFIRST

FIRST

FPUT

LAST

LPUT


Primitive Procedure - BUTTONS
BUTTONS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - BYE
BYE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - CASE
CASE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - CHAR
CHAR

CHAR number

effect:	where number is an integer between 0 and 255, inclusive

Outputs a character whose ASCII code corresponds to the number. To find the ASCII code corresponding to an input character (or to the first character of a word),  use the ASCII operation.

Example


See also...

ASCII

READCHAR

READKEY


Primitive Procedure - CHOOSER
CHOOSER

CHOOSER command

effect:	This operation makes it possible to run any Logo chooser from any user-defined procedure. The input is the name of a Logo primitive procedure which has a chooser. The CHOOSER operation opens this chooser and lets you choose the options offered in it. Now there are two possibilities:

Example

Example


See also...

RUN

MAKE

SHOW

READLISTDIALOG

READLISTTURTLE

READKEY


Primitive Procedure - CLEAN
CLEAN

CLEAN

effect:	Cleans the graphics screen, that is, covers it with the current background colour.

Example


See also...

CLEARSCREEN

DRAW

HOME


Primitive Procedure - CLEARSCREEN; CS
CLEARSCREEN	CS

CLEARSCREEN

effect:	Each turtle is moved (without drawing a line) to its home position and basic heading, as specified at the time it was created by MAKETURTLE command. The list of active turtles is not modified. All shown turtles remain shown and hidden turtles remain hidden, see HIDETURTLE and SHOWTURTLE commands, there is no change to the colour, pattern, width and mode (penup/pendown) of any turtle's pen.

Example

Note the difference between CLEARSCREEN and CLEAN.


See also...

CLEAN

DRAW

CLEARTEXT

HOME

GRAPHICSCREEN

SPLITSCREEN

TEXTSCREEN


Primitive Procedure - CLEARTEXT; CT
CLEARTEXT	CT

CLEARTEXT

effect:	Clears the text screen, that is, covers it with the current text screen background colour, prints the text prompt in the upper left corner of the text screen and places the text cursor next to it.

Example

Window Menu Clear Text command in the Main Window


See also...

CLEAN

GRAPHICSCREEN

SPLITSCREEN

TEXTSCREEN

SETTC


Special Word - CODEAREA
CODEAREA

PLACEMARK "CODEAREA number1 [number2 number3 number4 number5]

effect:	This is the name of a property which specifies rectangular areas on the graphics screen, that will be sensitive to the left mouse button.

CODEAREA is a word for which you define properties describing the rectangles and codes corresponding to them that will be reported by the READKEY operation whenever you click (that is, you press and release) the left mouse button inside the area. For example,

Example 1

you specify a rectangle with [30 100] as its upper left corner and [70 60] as its bottom right corner. From now on, whenever you click inside this area, the READKEY operation will output code 113.

You can use any integer as a code(that is, you are not limited only to ASCII codes). For the CODEAREA word you can define any number of properties (with different codes as their names) and thus define any number of rectangles.

Example 2


See also...

READKEY

MOUSE

TOUCHED

INSIDE?

OUTSIDE?

POS


Primitive Procedure - COS
COS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - COUNT
COUNT

COUNT input

effect:	If the input is a word, COUNT outputs the number of characters in it. If the input is a list, COUNT outputs the number of members in it. If the input is an image, COUNT outputs the number of frames in it.

Example


See also...

ITEM

MEMBER?


Primitive Procedure - CURSOR
CURSOR

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - DATE
DATE

DATE

effect:	The operation outputs a list of the four members of the list [day month year day_of_week], where the day_of_week is a number between 0 and 6, inclusive. 0 corresponds to Sunday, 1 to Monday ... etc.

Example


See also...

TIME


Primitive Procedure - DEBUG
DEBUG

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - DEC
DEC

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - DEFINE
DEFINE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - DEFINED?
DEFINED?

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - DIFFERENCE
DIFFERENCE

DIFFERENCE number1 number2

effect:	Outputs the difference between number1 and number2.

Example


See also...

-

PRODUCT

SUM

QUOTIENT


Primitive Procedure - DIR
DIR

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - DIV
DIV

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - DOT
DOT

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - DOTCOLOUR
DOTCOLOUR

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - DRAW
DRAW

DRAW

effect:	Prepares the graphics screen for new drawing by clearing the screen, erasing all turtles and recreating just turtle 0 (in its basic state - see MAKETURTLE command), making it active and shown, see SHOWTURTLE command.

Example


See also...

CLEARSCREEN

HOME

CLEAN

MAKETURTLE

SHOWTURTLE


Primitive Procedure - EACH
EACH

EACH [list commands]

effect:	For this list of commands all currently active turtles execute all instructions of the input. They do this in order; first turtle, then second etc.

In the list of instructions we can make use of the WHO operation: its value while EACH is active is the name of the active turtle which is currently executing the list. After evaluating the EACH command, the same turtles as before are active.

While EACH makes active turtles perform a given list of instructions one at a time, ASK command makes all named turtles perform it in "parallel".

Example

More examples


See also...

ALLTURTLES

ASK

MAKETURTLE

REORDER

TELL

WHO


Primitive Procedure - EDIT; ED
EDIT	ED

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - EDITFILE; EDFILE
EDITFILE	EDFILE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - EMPTY?
EMPTY?

EMPTY? input

effect:	Outputs TRUE if any is either the empty word, the empty list or the empty image. Otherwise outputs FALSE.

Example

Note that empty word, empty list and empty image are separate objects:

More examples


See also...

NUMBER?

LIST?

WORD?


Word with special meaning - END
END

END

effect:	Specifies the end of a procedure definition. The word END closes each user-defined procedure.

When typed on a separate line in the procedure definition mode (started by TO command), the mode is changed into the common dialogue specified by the prompt.

Example

Alternative Ways to Define Procedures


See also...

TO

RUN


Primitive Procedure - EOF?
EOF?

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - EQUAL?
EQUAL?

EQUAL? input1 input2

effect:	Outputs TRUE, if both inputs are identical words, identical images or lists. Otherwise the output is FALSE.

If the number of inputs is more than two, EQUAL? outputs TRUE, if all inputs are identical. Otherwise the output is FALSE.

Example

More examples.


See also...

WORD?

NUMBER?

LIST?

=


____s_HOM_ C__ðñ_ä                                          - ERALL
ERALL

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - ERASE; ER
ERASE	ER

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - ERASEFILE; ERFILE
ERASEFILE	ERFILE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - ERASETURTLE; ERTURTLE
ERASETURTLE	ERTURTLE

ERASETURTLE name

effect:	Erases the specified turtles - all of them must currently exist. Be careful: turtle 0 can be erased as well! To erase a turtle means to remove it from the ALLTURTLES list. To just move it out of the list of active turtles, use TELL command.

If turtle 0 is erased, a DRAW or ERALL command restore it with its home position at the point [0 0] and with the basic heading 0 degrees, i.e. straight to the North. To create a new turtle, use the MAKETURTLE command

.

Example


See also...

TELL

WHO

ASK

ALLTURTLES

MAKETURTLE


Primitive Procedure - ERROR
ERROR

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - EXP
EXP

This is a difficult command and isn't

explained in the Help for Kids


Word with Special Meaning  - FALSE
FALSE

FALSE

effect:	Represents logical value false or no. Is used as input to conditional procedures like IF and TEST, and logical operators AND, OR, and NOT.

Example


See also...

IF

TRUE


Primitive Procedure - FILE?
FILE?

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - FILL
FILL

FILL

effect:	Each active turtle fills its surrounding region with its set fill colour and fill pattern, using its set rules for filling.

To set fill colours for all active turtles, use the SETFILLCOLOUR command. Until you use this command, the fill colour is the current pen colour. To find the fill colour of the first active turtle, use FILLCOLOUR. To set the fill pattern for all active turtles, use SETFILLPATTERN. To find the fill pattern of the first active turtle, use FILLPATTERN. To set the rules for filling, use SETFILLMODE.

Example


See also...

SETFILLCOLOUR

SETPENCOLOUR

SETBACKGROUND


Primitive Procedure - FILLCOLOUR; FC
FILLCOLOUR	FC

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - FILLPATTERN; FP
FILLPATTERN	FP

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - FIRST
FIRST

FIRST input

effect:	If the input is a word, FIRST outputs a word containing only its first character. If the input is a list, FIRST outputs its first member. If the input is an image, FIRST outputs an image containing only its first frame.

Example


See also...

BUTFIRST

BUTLAST

FPUT

LAST

LPUT


Primitive Procedure - FORWARD; FD
FORWARD	FD

FORWARD number

effect:	Moves all currently active turtles the given number of steps (that is, pixels) in the direction they are heading.

If the active turtle is SHOWN?, its shape is displayed before and after the move.

Note that FORWARD 0 means to move ahead 0 steps, that is, a line of the length 1 is drawn. FORWARD 1 means to move ahead 1 step, therefore a line of the length 2 is drawn.

Example

If the command PENDOWN has been used then a line will be drawn. If you used the command PENUP then no line will be drawn. In PENERASE mode, the turtle will erase all colours.


See also...

BACK

HOME

SETPOS

SETX

SETXY

SETY


Primitive Procedure - FPUT
FPUT

FPUT input [list]

effect:	If the second input is a list, FPUT outputs a modified list whose FIRST member is any and BUTFIRST members are elements of the input list.

If the second input is a word, FPUT outputs a modified word created by joining word1 with word2. FPUT word1 word2 is the same as WORD word1 word2.

Example

To paste two words (or lists) together, use the command WORD.

Note the differences between the command FPUT and SENTENCE.


See also...

BUTFIRST

BUTLAST

FIRST

LAST

LPUT

SENTENCE


Primitive Procedure - GETGS
GETGS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - GETIMAGE
GETIMAGE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - GETSHAPE
GETSHAPE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - GETTS
GETTS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - GPROP
GPROP

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - GRAPHICSCREEN; GS
GRAPHICSCREEN	GS

GRAPHICSCREEN

effect:	Sets the entire Main Window to graphics. Text screen will not be displayed now, although its contents are not lost. The text screen is still active, that is, Logo carries out all instructions typed in from the keyboard.

To display the text screen with its current contents again, use TEXTSCREEN or SPLITSCREEN commands.

Example

Alternatives:

Window menu Graphics Screen command in the Main Window,

F5 function key, if the Main Window is active, or

Graphics Screen Button in the Main Window's Speed Bar.


See also...

SPLITSCREEN

TEXTSCREEN


Primitive Procedure - GREATER?
GREATER?

GREATER? number1 number2

effect:	Outputs TRUE, if number1 is greater than number2. Otherwise the output is FALSE.

If the number of inputs is other than two, GREATER? outputs TRUE if all the inputs are numbers sorted in descending order. Otherwise the output is FALSE.

Example 1

Example 2


See also...

LESS?

>

EQUAL?


Primitive Procedure - HEADING
HEADING

HEADING

effect:	Outputs an angle, which is the heading of the first active turtle.

0 means straight to the North, with heading increasing clockwise. To change heading, use either RIGHT, LEFT or SETHEADING commands.

Basic heading of the default turtle 0 is 0, but it can be redefined (or defined for any new turtle) with MAKETURTLE.

Example


See also...

LEFT

RIGHT

SETHEADING

TOWARDS


Primitive Procedure - HIDEBUTTONS
HIDEBUTTONS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - HIDESPEEDBAR
HIDESPEEDBAR

HIDESPEEDBAR

effect:	Hides the Speed Bar in the Main Window .

When the Speed Bar is hidden, the graphics screen can be made larger (for example, by pressing Default button in the Set Screens dialogue, see SETGS or SETTS commands).

If you want the Speed Bar displayed on the screen again, use SHOWSPEEDBAR command.

Example


See also...

SHOWSPEEDBAR


Primitive Procedure - HIDETURTLE; HT
HIDETURTLE	HT

HIDETURTLE

effect:	The command hides all active turtles.

To bring the shapes of all active turtles back onto the screen, use SHOWTURTLE. To find out whether the first active turtle is currently shown, use SHOWN?. Drawing lines when turtles are shown is much slower. Therefore it is sometimes a good idea to hide all.

To change the shape of all active turtles, use SETSHAPE with any image as its input.

Example 1

Example 2

Example 3.

Alternatives:

grey minus key (on the number keypad) makes all active turtles hidden,


See also...

SHOWN?

SHOWTURTLE

SETSHAPE


Primitive Procedure - HOME
HOME

HOME

effect:	Moves each active turtle to its home position specified when the turtle was created with MAKETURTLE

The actual heading of the turtle is not changed, neither is its pen mode (PU, PD, PE or PX, the pen colour, pattern, or width). Therefore the turtle draws a line when moved home, if its pen is in any drawing mode. The turtle's shape remains shown, if it was shown before (see SHOWN?). The screen is not cleared.

Example 1

Example 2


See also...

CLEARSCREEN

DRAW

CLEAN


Primitive Procedure - IF
IF

IF word [list1]

effect:	IF is a command or an operation depending on its second and third inputs. If these are lists of instructions, the whole IF structure is also a command. If the second and the third inputs are expressions giving results after the evaluation, the whole IF also gives a result after its evaluation and therefore is an operation. If IF is used as an operation, neither of its inputs can be an empty list.

The IF instruction must always be one logical line. If it is a command with 2 inputs only and it is followed by another instruction on the same logical line, you must enclose the whole IF structure in brackets. To make IF more readable, it is sometimes useful to substitute it with TEST, IFTRUE and IFFALSE .

Command: if the first input is TRUE, instructions in the list1 are evaluated. If the first input is FALSE and there exists the third input list2, instructions in list2 are evaluated. If the first input is FALSE and there is no third input, IF command has no effect.

Example


See also...

FALSE

TRUE


Primitive Procedure - IFFALSE; IFF
IFFALSE	IFF

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - IFTRUE; IFT
IFTRUE	IFT

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - IMAGE?
IMAGE?

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - IMAGESIZE
IMAGESIZE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - INC
INC

INC  word

effect:	Increases (increments) by 1 the variable named in the input - if the command has only one input, Otherwise, it increments the variable by a given number. The variable must be numeric.

Example


See also...

REPCOUNT


Primitive Procedure - INSIDE?
INSIDE?

INSIDE? [number1 number2 number3 number4]

effect:	If the operation has only one input, it outputs TRUE if the first active turtle  lies inside the specified rectangle - or on its border. If the first active turtle lies outside the rectangle, the operation outputs FALSE.

Example

Example


See also...

OUTSIDE?

CODEAREA

MOUSE

TOUCHED

IF

POS


Primitive Procedure - INT
INT

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - ITEM
ITEM

ITEM number input

ITEM  [number 1number2 ]  input

effect:	If the first input is a number, ITEM outputs the number-th member of the second input.

If the second input is a list, the output is its number-th member. If the second input is a word, the output is its number-th character. If the second input is an image, the output is its number-th frame. In all three cases, number must be between 1 and the number of items of any. (If the number is not an integer, its fractional part is truncated.)

Example


See also...

FIRST

LAST

COUNT

REPLACE


Primitive Procedure - KEY?
KEY?

KEY?

effect:	Outputs TRUE if any key has been pressed on the keyboard or the left mouse button has been pressed or released. The operation will also output TRUE, if the left mouse button is still pressed and the mouse is being dragged. Otherwise it outputs FALSE.

When reading a character from the keyboard, READKEY and READCHAR wait until the output of KEY? is TRUE.

Example


See also...

READCHAR

READLIST

READKEY

IF

WAIT

WAITUNTIL


Primitive Procedure - LAST
LAST

LAST  [list]

effect:	If the input is a word, LAST outputs a word containing only its last character. If the input is a list, LAST outputs its last member. If the input is an image, LAST outputs an image containing only its last frame.

Example


See also...

BUTFIRST

BUTLAST

FIRST

FPUT

LPUT


Primitive Procedure - LEFT; LT
LEFT	LT

LEFT number

effect:	Makes each active turtles rotate left (anti-clockwise) by the specified angle.

To find the heading of the first active turtle, use HEADING.

Example


See also...

RIGHT

SETHEADING

TOWARDS


Primitive Procedure - LESS?
LESS?

LESS? number1 number2

effect:	Outputs TRUE, if number1 is less than number2. Otherwise the output is FALSE.

If the number of inputs is more than two, LESS? outputs TRUE if all inputs are sorted in ascending order. Otherwise the output is FALSE.

Example 1

Example 2


See also...

<

GREATER?

EQUAL


Primitive Procedure - LIST
LIST

LIST  input1 input2

(LIST input1 input2 input3 )

effect:	Outputs a list containing all the inputs as its members. The inputs may be words, lists or images. Note the difference between LIST and SENTENCE.

Example1

Words, lists and images may be mixed together to form more complex lists of items:

Example 2


See also...

LIST?

SENTENCE


Primitive Procedure - LIST?
LIST?

LIST?  input

effect:	Outputs TRUE if the input is a list. Otherwise the output is FALSE.

Example 1


See also...

EMPTY?

LIST

SENTENCE

WORD?

NUMBER?


Primitive Procedure - LN
LN

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - LOAD
LOAD

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - LOADBITMAP
LOADBITMAP

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - LOADIMAGE
LOADIMAGE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - LOADLIBRARY; LOADLIB
LOADLIBRARY	LOADLIB

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - LOADPATH
LOADPATH

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - LOADSCREEN
LOADSCREEN

LOADSCREEN  word

the word must be a file name

effect:	Loads the contents of the file into the graphics screen. The file must be a standard bitmap of any size. Current width and height of the graphics screen is set to the actual size of the loaded bitmap. If its size is smaller than standard settings of Logo Main Window, the loaded bitmap is placed either to the upper left corner of the screen or is centred in the Main Window according to the current SETGS settings.

LOADSCREEN doesn't change the list of active turtles, or their states. However, all turtles that are in WRAP mode, are moved (if necessary) to stay within the actual graphics screen.

To save the current contents of the graphics screen, use SAVESCREEN. If no path is specified within the given file name, the SCREEN subdirectory of the home directory is used. If that subdirectory does not exit, the IMAGE subdirectory is used instead. To change this setting, use SETPATH with the "SCREEN as its first input. To find the current setting, use PATH with the "SCREEN input.

If no file extension is specified, LOADSCREEN adds .BMP.

Example


See also...

CLEARSCREEN

CLEAN

SETBACKGROUND


Primitive Procedure - LOCAL
LOCAL

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - LPUT
LPUT

LPUT input [list]

effect:	If the second input is a list, LPUT outputs a modified list whose LAST member is any and BUTLAST members are elements of the input list.

If both inputs are images, LPUT outputs a modified image created by joining all frames of image2 with all frames of image1. LPUT image1 image2 is the same as IMAGE image2 image1. (Be careful about the order of inputs!)

If the second input is a word, LPUT outputs a modified word created by joining word2 with word1. LPUT word1 word2 is the same as WORD word2 word1. (Be careful about the order of inputs!)

Example


See also...

FPUT

BUTFIRST

BUTLAST

FIRST

LAST

SENTENCE


Primitive Procedure - MAKE
MAKE

MAKE word value

effect:	Defines a variable named word with the second input as its value.

To find the value of this variable use THING "word  or just :word.

Example 1

Example 2


See also...

RUN

SHOW

PRINT


Primitive Procedure - MAKEERROR
MAKEERROR

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - MAKETURTLE
MAKETURTLE

MAKETURTLE  "name [ ]

effect:	... words ... are any of these words: PU, PD, PE, PX, PENUP, PENDOWN, PENUP, PENERASE, PENREVERSE, ST, HT, SHOWTURTLE, HIDETURTLE, TELL, or SETFRAMEMODE.

shape is either image, "LGW_file or variable with an image value

A new turtle is created with word as its name and all other inputs specifying its actual settings.

Example

More examples


See also...

ALLTURTLES

ASK

EACH

TELL

WHO

ERASETURTLE

ERALL

REORDER

SETSHAPE

SETXY

SETHEADING


Primitive Procedure - MEMBER?
MEMBER?

MEMBER? Input1 input2

effect:	Outputs TRUE, if the first input is a member of the second input which is a list. Otherwise outputs FALSE.

If the second input is a word, MEMBER? searches for the first input in the second input as a sub word.

Example 1

Example 2


See also...

WORD?

LIST?

EMPTY?

ITEM


Primitive Procedure - MOD
MOD

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - MOUSE
MOUSE

MOUSE

effect:	When used after the READKEY operation, MOUSE outputs a position [X Y] of the most recent click (or release or drag) with the left mouse button, which has taken place within the graphics screen.

MOUSE is used with READKEY, which outputs 0, if the left mouse button was pressed, and outputs -2, if the left mouse button was released. Thus, clicking the mouse means READKEY outputs either 0 or -2. READKEY outputs -1 if the left mouse button is still pressed and you are moving the mouse, that is, if you are dragging. When READKEY outputs 0, or. -2, MOUSE outputs the position, where pressing, or. releasing the button took place. When READKEY outputs -1, MOUSE outputs the current mouse position.

Example


See also...

CODEAREA

READKEY

SETMOUSECURSOR

TOUCHED

INSIDE?

OUTSIDE?


Primitive Procedure - NAME
NAME

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - NAME?
NAME?

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - NAMES
NAMES

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - NOT
NOT

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - NUMBER?
NUMBER?

NUMBER? input

effect:	Outputs TRUE if any is a number, that is, a numeric word. Otherwise the output is FALSE

Example


See also...

LIST?

WORD?

EMPTY?


Primitive Procedure - OR
OR

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - OUTPUT; OP
OUTPUT	OP

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - OUTSIDE?
OUTSIDE?

OUTSIDE? [number1 number2 number3 number4]

effect:	If this has only one input, it outputs TRUE if the first active turtle actually lies outside the specified rectangle. If the first active turtle actually lies inside the rectangle or on its border, the operation outputs FALSE.

If the operation has two inputs and the first one is a point, the output will be TRUE if the specified point lies outside the rectangle. Otherwise the output is FALSE. If the first input is a name of a turtle, OUTSIDE? will output TRUE if that particular turtle actually lies outside the rectangle. This is valid even if the turtle is not active or even if it is not shown, see SHOWN?.

Example

Example


See also...

INSIDE?

CODEAREA

MOUSE

TOUCHED

IF

POS


Primitive Procedure - OVERLAP?
OVERLAP?

OVERLAP? name

effect:	Outputs TRUE if the first active turtle actually overlaps the turtle specified by the input.

To overlap means that the first active turtle's shape (its current frame) overlaps the shape of the specified turtle. Do not forget that each frame is always a rectangle containing the actual picture - its surroundings may be invisible but belongs to the frame.

If the input is a list of turtles, the operation outputs TRUE if the first active turtle overlaps at least one of the turtles specified in the list. Otherwise it outputs FALSE.

A turtle never overlaps itself. A turtle which is not SHOWN? never overlaps any turtle, nor is it overlapped by any other turtle. The order of turtles in the ALLTURTLES list has no effect: overlapping has nothing to do with the "age" of turtles, that is, being above or being below the other turtle in the screen makes no difference.

Example


See also...

OVERLAPPED

MAKETURTLE

ASK

WHO

TRUE

FALS

SHOWN?


Primitive Procedure - OVERLAPPED
OVERLAPPED

OVERLAPPED

effect:	With no input, OVERLAPPED outputs the list of all turtles that are currently overlapped by the first active turtle.

A turtle never overlaps itself. A turtle which is not SHOWN? never overlaps any turtle, nor is it overlapped by any other turtle. The order of turtles in the ALLTURTLES list has no effect: overlapping has nothing to do with the "age" of turtles, that is, being above or being below the other turtles on the screen makes no difference.

Example


See also...

OVERLAP?

MAKETURTLE

ASK

WHO

TRUE

FALSE

SHOWN?


Primitive Procedure - PATH
PATH

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PATTERN
PATTERN

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PAUSE
PAUSE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PEN
PEN

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PENCOLOUR; PC
PENCOLOUR

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PENDOWN; PD
PENDOWN	PD

PENDOWN

effect:	For each active turtle the command puts its pen down. From now on, each active turtle will draw a line (in its set colour, width, and pattern) when it moves in the graphics screen.

You can change the action of the active turtle's pen with the commands PENUP or PENERASE.

Example


See also...

PENERASE

PENUP

SETPENCOLOUR

SETPENWIDTH

SETPATTERN


Primitive Procedure - PENERASE; PE
PENERASE	PE

PENERASE

effect:	Makes each active turtle change its pen's mode so that if it moves in the graphics screen, it will erase any points its pen passes over. To erase a point means to change its colour to the background colour.

To change the state of an active turtle's pen, use SETPEN with input PU, PD or PX, or use PENUP, PENDOWN or PENREVERSE . To find the current state of the first active turtle, use PEN. To modify the background colour, use SETBACKGROUND.

To deal with all settings for the turtle's pen in one step, use SETPENSTATE. To find all information about the first active turtle's pen in one step, use PENSTATE.

Example 1

Example 2


See also...

PENDOWN

PENUP

SETPENWIDTH

SETBACKGROUND

SETPATTERN


Primitive Procedure - PENREVERSE; PX
PENREVERSE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PENSTATE
PENSTATE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PENUP; PU
PENUP	PU

PENUP

effect:	For each active turtle this command lifts its pen up. Now, when active turtles move on the graphics screen, they will not draw lines.

To change the state of an active turtle's pen, use SETPEN with input PD, PE or PX, or use PENUP, PENERASE or PENREVERSE.

A new turtle created by MAKETURTLE has its pen down, but is not active. To find the current state of the first active turtle, use PEN. The CLEARSCREEN command doesn't change the state of any turtle's pen.

Example


See also...

PENDOWN

PENERASE

SETPENCOLOUR

SETPENWIDTH

SETPATTERN


Primitive Procedure - PENWIDTH; PW
PENWIDTH

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - FRAME
FRAME

FRAME

effect:	Outputs the number specifying which frame of the first active turtle's shape is currently used to show the turtle. If the turtle is currently shown as the first frame of its shape, for example, the output of FRAME will be 1; if it is shown as the 5th frame, the output will be 5.

If the actual turtle's shape is the empty image, the FRAME operation will output 0.

The FRAME operation works both when the turtle is shown by SHOWTURTLE or hidden by HIDETURTLE command.

How to Use Frames of an Image

Example


See also...

SETFRAME

SETFRAMEMODE

SETSHAPE


Primitive Procedure - PLAY
PLAY

PLAY [input note note etc.]

effect:	Makes the computer's speaker play notes specified by the input lists.

Any of these lists may contain letters as musical notes c d e f g a h plus P for pause and other symbols as follows:

Example: Do re mi fa sol...

Example: a Christmas song

note prefix (number 1, 2, 4, 8 etc.) setting its duration. For example, 1c means a whole note c, 2d means a half note d, 4f means a quarter note f, etc.,

note suffix, where # following a note denotes it is a sharp note, b following a note denotes it is a flat note, . (point) following a note denotes its duration is prolonged by 3/2,

letter T followed by an integer denoting the tempo in units of quarter notes per minute. Basic setting is T120,

letter O followed by an integer between 0 and 6, inclusive denoting the octave. Basic setting is O3. When O# is included in the list, it raises all following notes by one octave, when Ob is included, all following notes are lowered by one octave,

letter L followed by number 1, 2, 4, 8, 16 etc. setting basic note duration for all following notes. If a note has its own number prefix, basic note duration is not used for that particular note. Initial basic setting is L4,

letter R resets all current settings of L, T, and O, and makes them O3, T120, and L4.

Settings specified by L, T, O, and R remain valid for a following PLAY commands unless they are reset to new values or with R.


See also...

SOUND

PLAYWAVE


Primitive Procedure - PLAYWAVE; PLAYW
PLAYWAVE	PLAYW

PLAYWAVE word1

(PLAYWAVE word1  word2  ...)

PLAYWAVE [ word1  word2  ... ]

effect:	If you have a sound card installed in your computer (or the SPEAKER.DRV program), PLAYWAVE command plays the melody encoded in input files. Although there are some important differences between the behaviour of the sound card and Speaker, we will look at the sound card only.

If the command gets only 1 WAV_file as its input, it starts to play it and immediately continues with the following commands (while the melody is being played). This, however, is not true, if Logo finds another PLAYW command and has to play its input or inputs. If the first melody is still being played, it is  stopped and the second PLAYW is played.

Example


See also...

PLAY

SOUND


Primitive Procedure - PLIST
PLIST

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PO
PO

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - POLYGON
POLYGON

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - POLYGONLINE
POLYGONLINE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - POS
POS

POS

effect:	Outputs a point[X Y] representing (in Cartesian co-ordinates) the actual position of the first active turtle. Note that the Origin of the Cartesian plane is located in the centre of the graphics screen.

To change the current position of all active turtles (in Cartesian style, that is, by specifying a new point [X1 Y1] for them), use either SETPOS, SETX, SETXY or SETY.

Example


See also...

SETPOS

SETX

SETXY

XCOR

YCOR


Primitive Procedure - POTS
POTS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PPROP
PPROP

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PPS
PPS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PRIMITIVE?
PRIMITIVE?

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PRINT; PR
PRINT	PR

PRINT  input1

(PRINT input1 input2)

effect:	Prints all specified inputs on the text screen, or into the output file, if the output stream has been redirected there by PRINTTO. If there are more than one inputs, they are printed with spaces separating them. PRINT command moves the cursor to the beginning of the next line.

PRINT creates "readable" printing - it removes the outer brackets of lists, compare it with SHOW and TYPE, which is useful when working with sentences:

Example


See also...

SHOW

TYPE

PRINTLINE


Primitive Procedure - PRINTLINE; PL
PRINTLINE	PL

PRINTLINE  input1

(PRINTLINE input1 1 input2)

input1 , input2 are words or lists

effect:	Prints all specified inputs on the text screen, or to the output file, if the output stream has been redirected there by PRINTTO. Unlike PRINT, PRINTLINE prints each of its inputs on a separate line. If any input is a list, PRINTLINE prints its members on separate lines too. If the input is a list and any of its members is a list itself, it is printed on one line with the outer brackets removed:

Example

PRINTLINE moves the cursor to the beginning of the next line after printing all its inputs.


See also...

PRINT

TYPE

SHOW


Primitive Procedure - PRINTTO
PRINTTO

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PROCS
PROCS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PRODUCT
PRODUCT

PRODUCT number1 number2

(PRODUCT number1 number2 number3 )

effect:	Outputs the product of the two inputs. For more (or less) than two inputs you have to put the whole instruction into brackets.

Example


See also...

*

DIFFERENCE

QUOTIENT

SUM


Primitive Procedure - PROPS
PROPS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - PUTIMAGE
PUTIMAGE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - QUOTIENT
QUOTIENT

QUOTIENT number1 number2

effect:	Outputs number1 divided by number2. Division by zero causes an ERROR. Note the difference between QUOTIENT and DIV operation, which outputs integer division of its inputs.

Example


See also...

/

DIFFERENCE

SUM

PRODUCT


Primitive Procedure - RANDOM
RANDOM

RANDOM number

effect:	Outputs a random integer number between 0 and number-1, inclusive. (If the input number is not an integer, it is rounded first.) For example, the output from RANDOM 5 is one of numbers 0, 1, 2, 3 or 4.

Example 1

Example 2


Primitive Procedure - RANDOMIZE
RANDOMIZE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - READCHAR; RC
READCHAR	RC

READCHAR

effect:	Outputs a character typed in from the keyboard. If no character has been typed (that is, if no key has been pressed), READCHAR waits for it. (More technically: it waits until KEY? outputs TRUE). The character typed in is not shown on the screen.

If the input stream has been redirected by READFROM to come from a file, the output of READCHAR will be the next character from the file.

Example

If you press any of the selected control keys (arrows, Insert, Delete, Home, End, PgUp, and PgDn), the READCHAR output will be CHAR 0 and you have to use READCHAR again to find the code itself. Compare it carefully with READKEY.


See also...

READKEY

READLIST

READWORD

KEY?

READLISTDIALOG

READLISTTURTLE

MAKE

ASCII


Primitive Procedure - READFROM
READFROM

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - READKEY
READKEY

READKEY

effect:	Outputs the numeric ASCII code of the key pressed on the keyboard. If no key has been pressed, READKEY waits for it. (More technically: it waits until KEY? outputs TRUE). The character typed in is not shown on the screen.

Example

READKEY outputs "special values" if you press any of the selected control keys or if you click the left mouse button:

it outputs 9, 27, 13, 8, if you press Tab, Esc, Enter and BackSpace key respectively,

it outputs -72, -75, -77, -80, if you press an arrow key (up, left, right, and down respectively),

it outputs -115, -116, -117, -118, if you press Ctrl+left arrow, Ctrl+right arrow, Ctrl+up arrow, Ctrl+down arrow respectively,

it outputs -71, -79, -73, -81, -82, -83, if you press Home, End, PgUp, PgDn, Insert, and Delete respectively,

it outputs 1, 2, ... 26, if you press Ctrl+A, Ctrl+B, ... Ctrl+Z respectively (except Ctrl+C, Ctrl+V, Ctrl+X, Ctrl+K),

if you set FKEYS to 0 with SETLOGO, READKEY will output -59, -60, ... -69, if you press F1, F2, ..., F11 function key. If you set FKEYS to 12, READKEY will output -70 when F12 is pressed,

it outputs 0, if the left mouse button is pressed (only in the graphics screen) and -2, if the left mouse button was released. So, clicking the mouse means READKEY outputs either 0 or -2. READKEY outputs -1, if the left mouse button is still pressed and you are moving the mouse, that is, if you are dragging. Here you can make use of the MOUSE operation: When READKEY outputs 0, or. -2, MOUSE outputs the position where pressing, or releasing the button took place at that moment. When READKEY outputs -1, MOUSE outputs actual mouse position.

READKEY co-operates with CODEAREA - it outputs codes defined by CODEAREA properties.


See also...

CHAR

READCHAR

READWORD

READLIST

MOUSE

CODEAREA

KEY?

ASCII


Primitive Procedure - READLIST; RL
READLIST	RL

READLIST

effect:	Logo first prints a readlist prompt followed by a space on the text screen and waits until you type anything and press Enter. READLIST encloses all that you have typed into brackets and outputs it as a list:

Example


See also...

READCHAR

READKEY

READWORD

KEY?

MAKE

READLISTDIALOG

READLISTTURTLE


Primitive Procedure - READLISTDIALOG; RLD
READLISTDIALOG	RLD

READLISTDIALOG

effect:	A dialogue box (optionally with a question and a title) is displayed. Inside the dialogue box there is a text box and an OK button. The user can type into the text box and press Enter or click the OK button. The text written into the edit control is passed to Logo as a list and forms the output of the READLISTDIALOG operation.

Example

Example


See also...

READLIST

READLISTTURTLE

READCHAR

READKEY

READWORD

MAKE


Primitive Procedure - READLISTTURTLE; RLT
READLISTTURTLE	RLT

READLISTTURTLE

effect:	A text box is displayed on the position of the first active turtle (the edit control is centred on the position of the turtle). Logo then waits until the user types some text into the box and presses Enter. The box then closes and the typed text forms the result of the READLISTTURTLE operation.

Example

Example


See also...

READLISTDIALOG

READLIST

READCHAR

READKEY

READWORD

MAKE


Primitive Procedure - READWORD; RW
READWORD	RW

READWORD

effect:	Logo prints a readlist prompt followed by a space on the text screen and waits until you type in a word and press Enter. The output of the READWORD operation will be this word. If you type in more than one word (before pressing Enter), READWORD outputs only the first of them.

Example


See also...

READCHAR

READKEY

READLIST

KEY?

MAKE

READLISTTURTLE

READLISTDIALOG


Primitive Procedure - REMPROP
REMPROP

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - REORDER
REORDER

REORDER list

effect:	Reorders both the list of all turtles, that is, the ALLTURTLES list, and the list of all actually active turtles, that is, the WHO list. If the input list is [turt1 turt2 ... turtN] and all its members are either active or passive turtles, turt1 will become the first member of the ALLTURTLES list, turt2 the second one, etc. The first turtle which is currently active among turt1, ... turtN , will become the first member of the WHO list as well, i.e., it will become the first active turtle.

Example


See also...

MAKETURTLE

ALLTURTLES

WHO

OVERLAP?

OVERLAPPED?

TELL

ASK


Primitive operation - REPCOUNT; REPC
REPCOUNT	REPC

REPCOUNT

effect:	Can be used only inside REPEAT, FOR, WHILE and FOREACH commands. It outputs the number of times the particular REPEAT has been done (including this one):

Example

REPCOUNT operation behaves like a variable which is always increased by 1 in the body of REPEAT command.


See also...

REPEAT

INC


Primitive Procedure - REPEAT
REPEAT

REPEAT number [list]

effect:	Carries out the list of instructions a given number of times. If the first input to REPEAT is less than 1, the list of instructions is not carried out. If the number is not an integer, its fractional part is truncated first. A REPEAT command can be used within another REPEAT, etc.

Example 1

Example 2

It is often very useful to use the REPCOUNT operation inside the list of instructions to check the number of times the list has been repeated.


See also...

RUN

REPCOUNT

INC


Primitive operation - REPLACE
REPLACE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - RIGHT; RT
RIGHT	RT

RIGHT number

effect:	Makes each active turtle rotate right (clockwise) by the specified angle.

To find the actual heading of the first active turtle, use HEADING.

Example


See also...

LEFT

SETHEADING

TOWARDS


Primitive Procedure - ROUND
ROUND

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - RUN
RUN

RUN [list]

effect:	If RUN is used as a command, it carries out all instructions in the list of Logo instructions.

Example 1

RUN list is equivalent to REPEAT 1 list.

If RUN is used as an operation, it outputs the value of the input expression  (that is, the result of evaluating the expression).

Example 2


See also...

TO

END

REPEAT

MAKE


Primitive Procedure - SAVE
SAVE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SAVEBITMAP
SAVEBITMAP

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SAVEIMAGE
SAVEIMAGE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SAVELIBRARY; SAVELIB
SAVELIBRARY	SAVELIB

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SAVESCREEN
SAVESCREEN

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SENTENCE; SE
SENTENCE	SE

SENTENCE input1 input2

(SENTENCE input1 input2 input3)

effect:	Outputs a list constructed in the following way: if all inputs are lists, their members are combined into a single list.

If any input is a word, it is inserted into the resulting list as its member:

Example 1

Example 2

Note the difference between SENTENCE and LIST. Also note the difference between SHOW and PRINT when applied to a list.


See also...

LIST

WORD


Primitive Procedure - SETBACKGROUND; SETBG
SETBACKGROUND	SETBG

SETBACKGROUND number

effect:	Sets the background colour of the graphics screen as specified by the input.

Example

The whole graphics screen is cleaned and covered by the specified colour and the contents of the screen is lost. However, the turtles' states are not changed, they all stay at their positions, they are shown or hidden as before, etc.

See the commands CLEAN and CLEARSCREEN.


See also...

SETPENCOLOUR

SETSHAPECOLOUR

SETTC

CLEAN

CLEARSCREEN


Primitive Procedure - SETBURY
SETBURY

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETBUTTONS
SETBUTTONS

SETBUTTONS  [ [input]  [input]. [input] ]

effect:	Specifies the texts/graphics and behaviour that will be associated with the buttons of the Buttons Window. The first definition will appear on the first button, second definition on the second button etc. If you specify a number and a definition, you define one particular button. If the input is an empty list [ ], all buttons are restored to the default size and location within the window and all texts/ graphics and settings are removed.

To find the texts which are defined for buttons, use BUTTONS. The SETBUTTONS command can be used both when the Buttons Window is shown or hidden.

To show the Buttons Window, use SHOWBUTTONS. To hide it, use HIDEBUTTONS.

Example

Alternatives:

each button can be defined or redefined by clicking the right mouse button on it,

each button can be moved within the Buttons Window, by pressing the Shift key and dragging it with the right mouse button.


See also...

HIDEBUTTONS

SHOWBUTTONS


Primitive Procedure - SETCURSOR
SETCURSOR

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETFILLCOLOUR; SETFC
SETFILLCOLOUR	SETFC

SETFILLCOLOUR number

effect:	For each active turtle this specifies the fill colour to be used by FILL and POLYGON.

If you haven't specified any fill colour for a turtle, it will be identical to the turtle's pen colour. So, this command makes it possible to use different colours for lines and fills. However, every time you specify the pen colour with SETPENCOLOUR, the actual fill colour is set to the same colour.

To find the current fill colour of the first active turtle, use FILLCOLOUR.

Example

To specify the fill pattern, use SETFILLPATTERN.


See also...

FILL

SETFILLPATTERN

SETPENCOLOUR


Primitive Procedure - SETFILLMODE
SETFILLMODE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETFILLPATTERN; SETFP
SETFILLPATTERN	SETFP

SETFILLPATTERN number

effect:	For each active turtle SETFILLPATTERN defines its filling pattern to used by FILL and POLYGON for filling. If you haven't used the command, the fill pattern is 0.

Example

To find the fill pattern of the first active turtle, use FILLPATTERN.


See also...

FILL

SETFILLCOLOUR

SETPENCOLOUR

SETPATTERN


Primitive Procedure - SETGS
SETGS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETHEADING; SETH
SETHEADING	SETH

SETHEADING number

effect:	Turns each active turtle so that its new heading is now identical with the specified angle (that is, independently of its actual heading).

The heading is measured in degrees clockwise from North, that is, SETHEADING 0 sets the active turtles to the North, SETHEADING 90 sets them to East, etc.

To find the heading of the first active turtle, use HEADING operation.

Example


See also...

LEFT

RIGHT

TOWARDS


Primitive Procedure - SETIMODE
SETIMODE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETLOGO
SETLOGO

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETMOUSECURSOR; SETMC
SETMOUSECURSOR	SETMC

SETMOUSECURSOR  "name

effect:	This replaces the current shape of the mouse cursor with an image specified either directly by the input image or by the name of a LGW file, in which this image is stored. That is:

If the input is a number between 0 and 15, inclusive, a standard Windows cursor is chosen according to the following table:

0			4		8		12
1			5		9		13
2			6		10		14
3			7		11	invisible	15

The mouse cursor is always black and white. If specified image contains more colours, these would be reduced to black. Maximum size of the mouse cursor is 32 x 32 pixels. Larger images will be reduced to this size (which may change its shape). Second frame (if it exists) of the specified image is used to show the state of the mouse when its left button is pressed.

Example 1

Example 2


See also...

SETTC

SETBACKGROUND


Primitive Procedure - SETPATH
SETPATH

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETPATTERN
SETPATTERN

SETPATTERN number

The number can be 0, 1, 2, 3 or 4.

effect:	Sets the pen pattern in which all active turtles will draw while in the PENDOWN state.

0 - ________________

1 - - - - - - - - - - - - - - - -

2 - . . . . . . . . . . . . . . .

3 - - . - . - . - . - . - . - . -

4 - - . . - . . - . . - . . - . .

Example


See also...

SETPENCOLOUR

SETPENWIDTH

SETFILLPATTERN

SETFILLCOLOUR

FILL


Primitive Procedure - SETPEN
SETPEN

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETPENCOLOUR; SETPC
SETPENCOLOUR	SETPC

SETPENCOLOUR number

The number is a number between 0 and 15

effect:	Defines the actual pen colour for all active turtles as specified by the input.

To find the current pen colour of the first active turtle, use PENCOLOUR. Any turtle draws a line (in currently set colour, pattern, and width) if it is active and if its pen is in PENDOWN mode (or PENREVERSE mode, in which some special effects take place).

Note, that if the turtle's pen colour is a RGB colour, the lines drawn by this turtle really show as the RGB coloured lines in the graphics screen only if the pen's width is bigger than 1.

To set all options of the turtle's pen in one step, use SETPENSTATE. To find more information about the first active turtle's pen in one step, use PENSTATE procedure.

Example


See also...

SETFILLCOLOUR

SETFILLPATTERN

SETFILLCOLOUR

SETSHAPECOLOUR

SETBACKGROUND

SETPATTERN

SETPENWIDTH


Primitive Procedure - SETPENSTATE
SETPENSTATE

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETPENWIDTH; SETPW
SETPENWIDTH	SETPW

SETPENWIDTH number

effect:	Defines the pen width for all active turtles as specified by the input.

To find the actual pen width of the first active turtle, use PENWIDTH. Any turtle draws a line (in currently set colour, pattern, and width) only if it is active and in PENDOWN state (or PENREVERSE state, in which some special effects take place). When new turtle is created by MAKETURTLE, its pen width is 1.

Example

More examples of SETPENWIDTH and PENWIDTH


See also...

SETPATTERN

SETPENCOLOUR


Primitive Procedure - SETFRAME
SETFRAME

SETFRAME number

effect:	Specifies which frame of an active turtle's shape will be used from now on to show the turtle. This mechanism works only for the active turtles whose SETFRAMEMODE is TRUE.

If the current shape of a turtle has N frames, SETFRAME 1 means show the turtle as the first frame, SETFRAME 2 as the second frame, etc. The input number is first reduced by modulo N, that is, SETFRAME N+1 is the same as SETFRAME 1, SETFRAME 0 is the same as SETFRAME N, etc..

Example


See also...

FRAME

SETFRAMEMODE

SETSHAPE


Primitive Procedure - SETFRAMEMODE
SETFRAMEMODE

SETFRAMEMODE word

word is TRUE or FALSE

effect:	Specifies the way frames of an active turtle's shape will be used to show the turtle. The basic setting is always SETFRAMEMODE FALSE, which means that frames of an image (which are currently used as the turtle's shape) are used to depict the turtle's current heading.

SETFRAMEMODE TRUE is mainly used for screen animation. In this mode the frames have nothing to do with the turtle's current heading - we control them ourselves through the SETFRAME command; which frame and when will be used by a turtle on the graphics screen. 	How are Different FRAMES of an IMAGE Used

Example


See also...

FRAME

SETFRAME

SETSHAPE


Primitive Procedure - SETPOS
SETPOS

SETPOS [number1  number2 ]

effect:	Moves each active turtle to the specified point. SETPOS doesn't change the turtle's heading. If the turtle's pen is PENDOWN, it draws a line while moving to its new position.

To find current position of the first active turtle, use POS. Besides SETX, SETXY, SETY, and SETPOS, the position of an active turtle is also changed by FORWARD, BACK, CLEARSCREEN, DRAW, and HOME.

Example


See also...

POS

SETX

SETXY

SETY

XCOR

YCOR


Primitive Procedure - SETPROMPT
SETPROMPT

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETSHAPE
SETSHAPE

SETSHAPE "word

effect:	Specifies an image, which will be used as a shape of each currently active turtle.

If the input is an empty list [ ], the shape of each active turtle will be replaced by the basic shape (specified either implicitly by Logo as the triangle, or as specified in SLOGO.INI file).

Example


See also...

MAKETURTLE

SETFRAME

SETFRAMEMODE

SETSHAPECOLOUR


Primitive Procedure - SETSHAPECOLOUR
SETSHAPECOLOUR

SETSHAPECOLOUR number

effect:	For each currently active turtle an active shape colour  is specified. The input colour must be one of the basic 16 colours. If the input is the empty list [ ], the active shape colour is set for all active turtles to "No", that is, these turtles have no colour specified as their active shape colour. In this case the SHAPECOLOUR operation will output [ ].

Notice that, although the active shape colour must be one of the basic 16 colours, it can be replaced in the shape (through the SETPENCOLOUR command) by any RGB colour.

Example


See also...

SETPENCOLOUR

SETBACKGROUND

SETSHAPE


Primitive Procedure - SETTC
SETTC

SETTC number

effect:	Sets both colours of the text screen, that is, the colour of its background and colour of the text itself.

If you put down the input number in the form of 16*X + Y (both X and Y are integers between 0 and 15, inclusive), then number X indicates the colour of the text screen background and Y indicates the colour of the text. Basic setting of the text screen is 240, that is, 16 * 15 + 0.

From now on, light grey text would be printed on the dark grey background. To change both colours in the whole text screen immediately, use CLEARTEXT after setting the colours by SETTC.

Example


See also...

CLEARTEXT


Primitive Procedure - SETTS
SETTS

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SETTTEXT; SETTT
SETTTEXT	SETTT

SETTTEXT "word  [number1  number2  number3 ]

effect:	Sets the font and size in which all active turtles will print onto the graphics screen with the TTEXT command.

First input, text gives the name of the font, for example "System or [Times New Roman] - the actual list of available fonts depends on your Windows set-up. Num1 specifies the size of the font (in points). If this input is 0, default font size is selected. Num2 sets how bold the font will be. Value 400 here means Regular, value 800 means Bold. If the num3 is 1, the style will be italic, otherwise, it will be regular. If the whole second input to SETTTEXT is [ ], System font is selected.

Example


See also...

TTEXT


Primitive Procedure - SETX
SETX

SETX number

effect:	Moves each active turtle horizontally from its current position to a new X co-ordinate set by the number. SETX doesn't change the actual turtle's heading or its Y co-ordinate. If the turtle is set to  PENDOWN, it draws a line while moving to its new X co-ordinate.

To find X co-ordinate of the first active turtle, use XCOR. To find its current position, use POS. Beside SETX, SETXY, SETY, and SETPOS, the position of an active turtle is also changed by FORWARD, BACK, CLEARSCREEN, DRAW, and HOME.

Example


See also...

POS

SETPOS

SETXY

SETY

XCOR

YCOR


Primitive Procedure - SETXY
SETXY

SETXY  number1  number2

effect:	Moves each active turtle to the point specified by X co-ordinate number1 and Y co-ordinate number2. SETXY doesn't change the turtle's heading. If the turtle is set to  PENDOWN, it draws a line while moving to its new position.

To find current position of the first active turtle, use POS. Beside SETX, SETXY, SETY, and SETPOS, the position of an active turtle is also changed by FORWARD, BACK, CLEARSCREEN, DRAW, and HOME.

Example


See also...

POS

SETPOS

SETX

SETY

XCOR

YCOR


Primitive Procedure - SETY
SETY

SETY number

effect:	Moves each active turtle vertically from its current position to a new Y co-ordinate specified by the number. SETY doesn't change the actual turtle's heading or its X co-ordinate. If the turtle is set to PENDOWN, it draws a line while moving to its new Y co-ordinate.

To find Y co-ordinate of the first active turtle, use YCOR. To find its current position, use POS. Beside SETX, SETXY, SETY, and SETPOS commands, the position of an active turtle is also changed by FORWARD, BACK, CLEARSCREEN, DRAW, and HOME.

Example


See also...

POS

SETPOS

SETX

SETXY

XCOR

YCOR


Primitive Procedure - SHOW; SH
SHOW	SH

SHOW input1

(SHOW input1 input2 ....)

effect:	Prints all specified inputs on the text screen, or into the output file, if the output stream has been redirected by PRINTTO. If there are more inputs, they are printed with spaces separating them. SHOW moves the cursor to the beginning of the next line afterwards.

SHOW uses "technical" printing - it prints all brackets unchanged, see PRINT and TYPE.

Example 1

Example 2


See also...

PRINT

TYPE

TTEXT

PRINT

PRINTLINE


Primitive Procedure - SHOWBUTTONS
SHOWBUTTONS

SHOWBUTTONS

effect:	Makes the Buttons Window appear on the screen. The definitions of buttons are not changed by showing or hiding the Buttons Window.

To hide the chooser from the screen, use HIDEBUTTONS. To define or redefine the behavior (the text/graphics and the action) of the buttons, use SETBUTTONS. To find the current definitions of the buttons, use BUTTONS.

Example


See also...

HIDEBUTTONS

SETBUTTONS


Primitive Procedure - SHOWN?
SHOWN?

SHOWN?

effect:	Outputs TRUE if the first active turtle is actually shown on the graphics screen. Otherwise, the output is FALSE.

To show all active turtles on the screen, use SHOWTURTLE. To hide all shown active turtles from the screen, use HIDETURTLE. To show one particular turtle (if there are many of them), use ASK.

Example


See also...

HIDETURTLE

SHOWTURTLE

ASK

OVERLAP?

OVERLAPPED


Primitive Procedure - SHOWSPEEDBAR
SHOWSPEEDBAR

SHOWSPEEDBAR

effect:	Makes the Speed Bar display on the screen.

When the Speed Bar is hidden, graphics screen can be made a little larger (for example, by pressing Default button in the Set Screens dialogue, see SETGS or SETTS).

To hide the Speed Bar from the screen, use HIDESPEEDBAR.

Example


See also...

HIDESPEEDBAR


Primitive Procedure - SHOWTURTLE; ST
SHOWTURTLE	ST

SHOWTURTLE

effect:	The command shows all active turtles' shapes on the screen.

To make the shapes of all active turtles disappear from the screen, use HIDETURTLE. To find out whether the first active turtle is currently shown, use SHOWN?. Drawing lines when turtle (or turtles) are shown, is much slower. Therefore it is sometimes better to hide all turtles from the screen.

To change the shape of all active turtles, use SETSHAPE with any image as its input.

Example


See also...

HIDETURTLE

MAKETURTLE

SETSHAPE

ERASETURTLE

TELL

ASK

WHO

SHOWN?


Primitive Procedure - SIN
SIN

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SOUND
SOUND

SOUND [input1 input2]

(SOUND input1  input2 ... )

effect:	Plays a sequence of the tones specified by the list_of_numbers. Two successive numbers in the input list always represent one tone: first number specifies its frequency, the second one its duration. Duration 1000 takes approx. 1 second.

Example


See also...

PLAY

PLAYWAVE


Primitive Procedure - SPLITSCREEN; SS
SPLITSCREEN	SS

SPLITSCREEN

effect:	Sets the Main Window to show both graphics and text screens. Number of lines displayed in the text screen can be changed with SETTS or found with the GETTS operation.

Actual contents of the graphics screen is not affected by the SPLITSCREEN command, it is only temporarily covered by the text screen and is still active. That is, turtles can draw and move even beneath the text screen part of the Main Window. To set the entire Main Window to graphics, use the GRAPHICSCREEN command. Current contents of the text screen are not affected by SPLITSCREEN either - it now shows only the most recent lines typed. To set the entire Main Window to text, use the TEXTSCREEN command.

Example

Alternatives:

Window Menu Split Screen command in the Main Window,

F6 key, if the Main Window is active, or

Split Screen Button on the Main Window's Speed bar.


See also...

GRAPHICSCREEN

TEXTSCREEN


Primitive Procedure - SQRT
SQRT

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - STAMP
STAMP

STAMP

effect:	Each active turtle stamps its shape (its current frame) in the graphics screen. With the STAMP command the frame becomes a part of the graphics screen contents.

Do not confuse STAMP with PUTIMAGE, which puts down the given image, not the shape of the turtle itself.

Makes the only active turtle 0 and makes its shape a small triangle:

Example


See also...

TTEXT

SETTTEXT

SETSHAPE


Primitive Procedure - STOP
STOP

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - SUM
SUM

SUM number1 number2

(SUM number1 number2 number3)

effect:	Outputs the sum of the two numbers. To use more or less than 2 inputs you must enclose the whole instruction in brackets.

Example 1

Example 2.


See also...

+

DIFFERENCE

PRODUCT

QUOTIENT


Primitive Procedure - TAN
TAN

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - TELL
TELL

TELL [name]

TELL [list names]

effect:	Makes turtle or turtles named in the input become active. When Logo is started, the only existing and active turtle is turtle 0.

Example

To find the list of all active turtles (or a single name, if there is only one active turtle), use WHO. To change the order of turtles in this list, use REORDER.

Any existing turtle, either active or not, can be addressed by ASK to execute a given list of instructions. Any turtle can be erased with ERASETURTLE.

More examples


See also...

ALLTURTLES

ASK

EACH

MAKETURTLE

ERASETURTLE

WHO


Primitive Procedure - TEST
TEST

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - TEXT
TEXT

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - TEXTSCREEN; TS
TEXTSCREEN	TS

TEXTSCREEN

effect:	Sets the entire Main Window to text.

Current contents of the graphics screen are not lost, they are temporarily covered by the text screen,  turtles can draw and move even beneath the text screen. To set the entire Main Window to graphics, use the GRAPHICSCREEN command. To set it to both graphics and text screens, use the SPLITSCREEN command.

Example


See also...

GRAPHICSCREEN

SPLITSCREEN


Primitive Procedure - THING
THING

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - THROW
THROW

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - TIME
TIME

TIME

effect:	Outputs a list of four numbers [hours minutes seconds hundredths_of_second ] that correspond to the time set in your computer.

Example


See also...

DATE


Primitive Procedure - TO
TO

TO word

effect:	Changes the Logo dialogue mode into the procedure definition mode. The prompt is replaced with a special prompt > to let you know that you are defining a procedure.

The word specifies new the procedure's name, other inputs :input1, :input2, etc. specify the names of the new procedure's inputs.

In the lines following TO you type the body of the new procedure. Note that procedure definition mode allows only line editing commands. You finish the definition by typing END on a separate line.

Example


See also...

END

RUN


Primitive Procedure - TOPLEVEL
TOPLEVEL

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - TOUCHED
TOUCHED

TOUCHED

effect:	When used after the READKEY operation, TOUCHED outputs the name of a turtle which has been most recently clicked on by the left button of the mouse. Turtles which are currently hidden by HIDETURTLE are not taken into account. However, all shown turtles, that is, both active and passive, respond to TOUCHED.

For a turtle "to be clicked on" means that the position where the left mouse button has been most recently clicked lies anywhere within the turtle's shape.

If the most recent left mouse button click lies outside any turtles' shapes, the output is an empty list [ ]. If there are currently more turtles with overlapping shapes, TOUCHED outputs the name of the youngest turtle among them. This turtle is always on the top of others (which is important information for animation - to change this, use REORDER).

Example


See also...

MOUSE

READKEY

CODEAREA

MAKE

INSIDE?

OUTSIDE?

OVERLAPPED

OVERLAP?


Primitive Procedure - TOWARDS
TOWARDS

TOWARDS [number1 number2]

effect:	Outputs a heading which the first active turtle should take to face towards the position specified by the point. The heading is measured in degrees clockwise from the North. If the input is a turtle, the output of the operation is a heading which the first active turtle turn to to face this turtle.

Note that the output of TOWARDS is not the angle by which the turtle should turn left or right to face the given point. However, the output could be used by SETHEADING to turn the turtle to point the way you want.

Example 1

Example 2


See also...

HEADING

POS

SETHEADING

SETXY


Word with Special Meaning - TRUE
TRUE

TRUE

effect:	It represents logical value true or yes. Is used as input to conditional procedures like IF and TEST, and the logical operators AND, OR, and NOT.

Example


See also...

FALSE

IF


Primitive Procedure - TTEXT; TT
TTEXT	TT

TTEXT word

TTEXT [text]

effect:	Makes each active turtle print the given text or texts on the graphics screen at its position and in the font and its size set previously by SETTTEXT.

Text1, text2, ... are printed in each turtle's pen colour (even if the pen is currently set to PENUP, however, this option is not correctly supported by Windows for RGB colours of the pen). If any of inputs text1, text2, ... are lists, TTEXT prints them without the brackets - as it does with PRINT in the text screen.

The inputs are printed perpendicular to the turtle's heading, that is, if it faces North, text will be printed in the horizontal line. For certain fonts, you can print in any direction.

Example


See also...

SETTTEXT


Primitive Procedure - TYPE
TYPE

TYPE input1

(TYPE input1 input2 ... )

effect:	Prints the inputs on the text screen, or to the output file, if the output stream has been redirected there by PRINTTO. Printed inputs are not separated by spaces, neither is the cursor moved to the next line (compare TYPE with SHOW and PRINT).

If the input is a list TYPE removes the outer brackets,. An image is printed in the form of {imageN}, where N is the frame number. To see the actual contents of the image, use the Memory Window.

Example 1

Example 2.


See also...

PRINT

SHOW

PRINTLINE


Primitive Procedure - UNBURY
UNBURY

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - WAIT
WAIT

WAIT number

effect:	where number is a positive number not greater than 65535

Makes SuperLogo halt all activity for the set time. WAIT 1000 will stop everything for approximately one second.

Example


See also...

WAITUNTIL

READKEY

KEY?

IF


Primitive Procedure - WAITUNTIL
WAITUNTIL

WAITUNTIL [command]

effect:	Evaluates the input expression repeatedly until its value is TRUE.

Example


See also...

WAIT

READKEY

KEY?


Primitive Procedure - WHO
WHO

WHO

effect:	Outputs the name of the active turtle, or a list of all currently active turtles if there's more than one.

This list can be modified using TELL. Be careful not to confuse a WHO list with the output of  ALLTURTLES, which outputs the list of all currently existing turtles, i.e. both active and non-active ones.

The order of turtles in a WHO list is the order in which you created them with MAKETURTLE. This order, however, can be changed by REORDER. WHO is often used  with the EACH command.

Example

More examples


See also...

ALLTURTLES

ASK

EACH

ERASETURTLE

MAKETURTLE

TELL

ERASETURTLE

REORDER


Primitive Procedure - WINDOW
WINDOW

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - WORD
WORD

WORD input1 input2

(WORD input1 input2 input3 )

effect:	Outputs a word formed by joining all input words. Input words may be empty.

Example


See also...

EMPTY?

LIST

LIST?

SENTENCE

WORD?


Primitive Procedure - WORD?
WORD?

WORD? input

effect:	Outputs TRUE if the input is a word, that is, either letters or numbers. Otherwise the output is FALSE.

Example


See also...

EMPTY?

LIST?

NUMBER?

WORD


Primitive Procedure - WRAP
WRAP

This is a difficult command and isn't

explained in the Help for Kids


Primitive Procedure - XCOR
XCOR

XCOR

effect:	Outputs the actual X co-ordinate of the first active turtle's position.

To change the current X co-ordinate of any active turtle, use SETX. Its position can be also changed with FORWARD, BACK, SETPOS, SETXY, SETY , CLEARSCREEN, DRAW  or HOME.

Example 1

Example 2


See also...

POS

SETPOS

SETX

SETY

YCOR

SETXY


Primitive Procedure - YCOR
YCOR

YCOR

effect:	Outputs the Y co-ordinate of the first active turtle's position.

To change actual Y co-ordinate of any active turtle, use SETY. Its position can be also changed with FORWARD, BACK, SETPOS, SETXY, SETX , CLEARSCREEN, DRAW  or HOME.

Example 1

Example 2


See also...

POS

SETPOS

SETX

SETY

XCOR

SETXY


Editing User Defined Objects

The Editor is used when you want to create a variable or procedure. If you want to edit a turtle or an icon then you must use MegaPaint.

About the editor

About MegaPaint


The Editor

More about the Editor.


Keyboard Shortcuts in the Editor
Keyboard Shortcuts in the Editors

In the Editer you can use the following keys:

Right arrow moves the text cursor one character to the right,

Left arrow moves the text cursor one character to the left,

Ctrl+right arrow moves the text cursor one word to the right,

Ctrl+left arrow moves the text cursor one word to the left,

End moves the text cursor to the end of the current line,

Home moves the text cursor to the beginning of the current line,

Del deletes one character at the current cursor position (or all selected text),

Back Space deletes one character to the left of the text cursor (or all selected text).The rest of the line together with the cursor itself is moved one character to the left,

Up arrow moves the text cursor one line up,

Down arrow moves the text cursor one line down,

Page Up moves the text cursor up by the height of the window,

Page Down moves the text cursor down by the height of the window,

Ctrl+Home moves the text cursor to the start of the current window,

Ctrl+End moves the text cursor to the end of the current window.


Editing Properties of a Word

This is a difficult command and isn't

explained in the Help for Kids


Editing Value of a Variable
Editing the Value of a Variable

A variable always has a value. This can be a word or a list.

If you type nothing in the Editor Window, the value will be an empty word. If you type [ ], the value will be an empty list.


Editing Definition of a Procedure
Editing the Definition of a Procedure

This is a difficult command and isn't

explained in the Help for Kids


Closing the Object Editor

You can close the Object Editor by:

pressing F12 function key,

choosing End Editing in the Memory Window, if the Editor was opened from here and is still on the screen,

clicking the mouse on the minimise icon of the Editor, or any other standard way to close a window through its control menu icon.

If you want to cancel the changes you have just made in the Object Editor Window and return to the object's previous contents, press Esc. Logo will ask whether you want to accept the modified contents.


Object Editor

The Object Editor makes it possible to create or modify "textual contents" of any user defined object (like procedures or variables). You can open it from the Memory Window or directly from the text screen with EDIT.

Editing a procedure

Other features

Menubar


Object Editor

Object Editor makes it possible to create or modify the text and numbers that make up any user-defined object. You can open it from the Memory Window or directly from the text screen by Logo primitive command EDIT.

Editing a procedure

Other possibilities

What You Can Do Outside the Editor While Editing

Keyboard Shortcuts in the Editors

Drag and Drop

Closing the Object Editor

Menubar


Object Editor

Object Editor makes it possible to create or modify the text and numbers that make up any user-defined object. You can open it from the Memory Window or directly from the text screen by Logo primitive command EDIT.

Editing a procedure

Other features

Menubar

Edit Menu Commands

Search Menu Commands

Option Menu Commands

Commands Menu Commands

The End Command


Edit Menu Commands (in the Object Editor)

These commands allow you to copy parts of a procedure or variable. This can be done directly or through the clipboard.

If you want to copy text to the clipboard you must select the text first. Then you can copy the text to the clipboard and paste it in another procedure or variable. You can also paste the text in the text screen.

Commands

Undo

Cut

Copy

Paste


Undo

Use this command to undo the following actions:

typing of a single character or longer piece of text unless you have moved the cursor,

deletion of a single character or longer piece of text unless you have moved the cursor.


More about...

Edit Menu Commands in the Editor.


Cut (Editor)
Cut

This command allows you to delete selected text from the Editor or text- screen and put it on the Clipboard. The text can be pasted anywhere else (in the Editor or in the text screen or even outside SuperLogo) with the command Paste.


Copy (Editor)
Copy

This command allows you to copy selected text from the Editor or text- screen to the Clipboard. This text can be pasted anywhere else (in the Editor or in the text screen or even outside SuperLogo) with the command Paste.


Paste (Editor)
Paste

This command allows you to insert text from the Clipboard at the the cursor position.


Search Menu Commands (in the Object Editor)

These commands allow you to search and replace text in the Editor.

Commands

Find...

Replace...

Find / Replace Next	F7


More about...

Search Menu Commands in the Editor.


Find (in the Object Editor)
Find...

SuperLogo searches in the open window for the text. If you want a Case sensitive search then select the option Match Case.

If nothing is found then SuperLogo will tell you. If the text is found it will be selected. Choose the command Find / Replace Next or press F7 if you want SuperLogo to continue searching.


Replace (In the Object Editor)
Replace...

This command allows you to replace one area of text with another. You can use the following options:

select Match Case if SuperLogo must chech precisely for capital letters,

select Replace All if you want to replace everything in one go,

select Ask Before Replacing if you want SuperLogo to ask each time if the text has to be replaced.


Find / Replace Next (Editor)
Find / Replace Next

Continues searching the text. See Find and Replace.

Functionkey:	F7


Options Menu Commands (in the Object Editor)

Commands

Highlight Primitives - this will highlight all Superlogo Commands. This will make it easy to look for errors.

Indent - this will make SuperLogo indent automatically, just as far as the previous line, so you can see which parts of a procedure belong together.


Picker Command (in the Object Editor)
Commands Menu Commands (in the Object Editor)

Opens:

the List of Commands Window so you can pick a command easily.

a chooser if the cursor is on a command that has a chooser.


End Command

Closes the Object Editor and updates the contents of the object just edited. It the editor has been opened from the Memory Window, updated contents of the object are displayed in its inspection window.

Shortcut Key: F12


Drag and Drop
Drag-and-Drop Editing

Drag-and-drop text editing feature allows you to move text within the Object Editor Window or within the File Editor Window but not from one window to the other. To Drag-and-Drop, you have to:

select the text you want to move,

drag the text to a new location anywhere within the window.

If you try to move the text outside the window, the vertical bar starts to blink and Logo doesn't allow you to do so.


Actions Outside the Editor While Editing

If you open the Object Editor from the Memory Window some operations can still be performed in the Memory Window; you can select and inspect any other object, you can choose any of the Options Menu commands, you can hide the Memory Window etc.

If you choose to open the Object Editor while still editing another object, you are asked to confirm or discard the new contents of the modified object first. The Editor is then opened with the contents of another object.


Selecting text in the Editor
Select the Text...

With the mouse you can select:

any text - just drag the cursor across the text.

a word - double-click the word,

a line - press and hold the Ctrl key and click the line.

With the Keyboard you can select:

any text -  move the text cursor to one end of the text you want to select, press and hold the Shift key and move the cursor to the other end of the text,

to the beginning of this word -  press Ctrl+Shift+Left arrow,

to the beginning of the next word -  press Ctrl+Shift+Right arrow,

to the beginning of the line -  press Shift+Home,

to the end of the line -  press Shift+End,

to the start of the text -  press Ctrl+Shift+Home,

to the end of the text - press Ctrl+Shift+End.


More about...

More information about the menu's in SuperLogo's Main Screen.


Problem Windows

After choosing a problem in the Problems Window a new window appears on the screen containing the problem to be solved. In its title bar you see the name of the problem you have just chosen.

If you have a Problem Window displayed in the screen, it will not disappear until you close it - you can even open other windows (like the Memory Window).

More Windows with Problems can be open within the Main Window at the same time. However, you can't open the same problem twice.


How to Produce Our Own Problem File

This is a difficult command and isn't

explained in the Help for Kids


Text Screen

This screen allows you to enter SuperLogo commands. The results of commands like PRINT, SHOW and TYPE also appear in the text screen.

See also:

Entering SuperLogo commands on the command line

How to create your own procedures

Input and output of SuperLogo procedures

Command Line Editing Keys


Command Line Editing Keys

The command line starts with the text prompt (normally a question mark). This is where you type in Logo commands. These will be executed when you press Enter key. The way the contents of the command line are executed depends on the actual Logo mode: it may be

  another line of our procedure definition, if Logo is in a procedure definition mode,

  a complete instruction, like RIGHT 90, which is carried out at once,

  several complete instructions, like FORWARD 100 RIGHT 90, which are carried out at once, one by one from left to the right,

  a name of a command only (that is, a command which normally expects one or more inputs (like SETPENCOLOUR), but you pressed Enter or F9 key without specifying  them. If there is a chooser related to the command, it opens on the screen and waits for the inputs,

  text (a character, a word, or a list) expected by READCHAR, READWORD, or READLIST.

Any part of a command line can be selected in the standard Windows way and cut or copied into the Clipboard. If there is already any text in the Clipboard (that is, any text which you have previously Cut or Copied), it can be pasted into the command line at the current cursor position by pressing Ctrl+V keys.

Before you press the Enter key, the contents of the command line can be edited in standard Windows way. Beside this, there are some additional important keyboard shortcuts:

  Up arrow displays previous contents of the command line (from the History of Command Line's Contents). If you keep pressing the key, older and older commands are displayed - 10 or even more previous commands can be found and used in this way,

  Down arrow goes in the opposite direction in the History; if you have already pressed Up arrow, you move to the more recent instructions,

  Esc erases the whole command line and moves the cursor to its start.


Other Keys and Their Effects

Beside command line editing keys and function keys F1 to F12 you can make use also of the following shortcut keys:

  Ctrl+F1 - if the text cursor is currently positioned within any Logo primitive procedure name (and the Main Window is active), Ctrl+F1 opens Help with detailed information on this procedure, (this does not work while a program is running),

  grey plus ( + ) key (to the right from the numeric keypad) - shows all active turtles in the graphics screen. Is equivalent to typing in SHOWTURTLE. This shortcut can be used any time,

  grey minus ( - ) key (to the right from the numeric keypad) - hides all active turtles from the graphics screen. Is equivalent to typing in HIDETURTLE. This shortcut can be used any time. When turtles are hidden, all drawing is much quicker,

  Shift+grey plus ( + ) keys - shows all turtles (active and inactive) in the graphics screen. This shortcut can be used any time,

  Shift+grey minus ( - ) keys - hides all turtles from the graphics screen. This shortcut can be used any time,

  Ctrl+Break stops any running procedures. Is equivalent to pressing F12 function key or clicking Stop button with left mouse button (however, there is a difference if you set FKEYS to 12 with SETLOGO),

  Ctrl+F9 executes START if it currently exists in the Memory.

You can use this keyboard combination to start a project in memory after stopping it with Stop.


Graphics Screen

The graphics screen contains the turtle. All commands relating to the turtle are executed in the graphics screen..

Changing the size of the graphics screen

See also:

Left mousebutton

Right mousebutton


Re-sizing and Scrolling the Graphics Screen

When SuperLogo starts, the actual height and the width of the graphics screen are set by the maximised size of the Main Window.

You can re-size the text screen.

Select Set Screen... in the Options Menu to re-size the graphics screen.


Speed Bar Buttons

Speed Bar is displayed across the top of the Main Window to give you quick access to several commands and options that would normally take several clicks on the menus. Its buttons can be clicked with the left mouse button (whenever they are not greyed), or by pressing F1 for the first of them, F2 for the second of them etc., see Function Keys F1 to F12.

SuperLogo Help -Contents	F1

(for more information about using Help: press F1 while you are in Windows Help)

Save project as...	F2

Open project...	F3

Show / Hide Memory	F4

Graphics screen	F5

Split screen	F6

Text screen	F7

Choose a Problem...	F8

Show list of commands window	F9

Show / Hide buttons window	F10

Choose a demo	F11

STOP the current procedure	F12

Speed Bar can be hidden / shown either with the  Hide / Show Speed Bar command of the Window Menu or with HIDESPEEDBAR and SHOWSPEEDBAR.


Function Keys F1 to F12

F1 - SuperLogo Help - Contents

F2 - Save Project As...

F3 - Open Project...

F4 - Show / Hide Memory

F5 - Graphics Screen

F6 - Split Screen

F7 - Text Screen

F8 - Choose a Problem...

F9 - Show List of Commands Window

F10 - Show / Hide Buttons Window

F11 - Choose a Demo Program

F12 - STOP the current procedure


STOP the current procedure

This is used to stop the procedure that is running now.

Button:

Other keys:	F12, Ctrl+Break


See also...

Right Mouse Button


Left Mouse Button

With the left mouse button (either by clicking, double-clicking, or dragging) you can do the following in the Main Window:

  open its Control Menu by clicking the Control Menu button,

  close the application by double-clicking the Control Menu button,

  restore or maximise the Main Window by double-clicking in the title bar,

  minimise or maximise the Main Window by clicking the minimise or maximise buttons,

  select a command from the menu bar,

  press any Speed Bar button (which is equivalent to pressing F1 to F12),

  when the mouse pointer is correctly positioned over the dividing line between the graphics screen and the text screen, it changes its shape to signify that a vertical adjustment of the division can be made. In this way you can set how many lines will be displayed in the text screen and what part of the graphics screen will be currently visible.

See also:

  Right Mouse Button

  Right Mouse Button in the Text Screen


See also...

Left Mouse Button


Right Mouse Button

You can click with the right mouse button on:

the graphics screen

a turtle

the text screen


Right mousebutton in the graphics screen

With the right mouse button you can do several things quickly in the graphics screen. You will see the following dialog:

Click on a part of the image for more information.


Right mouse button on a turtle

With the right mouse button you can do several things quickly.

When you click on a turtle with the right mouse button, you will see the following window:

Click on a part for more information:


Right Mouse Button in the Text Screen

If you click somewhere in the text screen with your right mouse button you will see the following dialogue:

Click on a part of the image for more information:


Make turtle

With this you can add a turtle. If you click on this the chooser Make turtle will appear. The turtle is placed on the spot where you clicked. See the command MAKETURTLE.


Move Turtle ...

The mouse cursor changes to a cross + question mark. With this cursor you can drag (either with the left or right mouse button) any shown turtle (active or inactive) to any location within the graphics screen. If the turtles pen is down, a line connecting previous and new positions will be drawn on the screen.

  Alternative:  press Shift key and drag the turtle with the right mouse button


Load screen...

This allows you to load a screen quickly. See the command LOADSCREEN


Save screen as...

This allows you to save the screen as a bitmap.


Graphics Screen

This is a toggle option. SuperLogo first checks if the graphics screen and text screen are visible. Then you can:

maximize the graphics screen. The text screen will disappear. See the command GRAPHICSCREEN.

unhide the text screen. See the command SPLITSCREEN.


Clear Graphics

This allows you to clear the graphics screen. The turtle will return to it's home position.


Copy Screen

This will copy the entire graphics screen to the clipboard..


Paste Screen

This will paste the contents of the clipboard into the graphics screen. The graphics screen will adjust its size to the pasted bitmap


Turtle: Change Me

Opens the chooser Change Turtle. Here you can edit all turtle settings except it's name.


Turtle: Pen up

This is a toggle option. You can specify whether the pen is on the paper or not. See the commands PENDOWN and PENUP.


X Y

This tool helps to specify the coordinates on the graphics screen. Click with the mouse in the graphics screen to choose the co-ordinates of a point. The co-ordinates are written back in the form X Y.


[X Y]

This tool helps to specify the coordinates on the graphics screen. Click with the mouse in the graphics screen to choose the co-ordinates of a point. The co-ordinates are written back in the form [X Y].


Rectangle

This tool helps to get the coordinates of a rectangle in the graphics screen. To specify a rectangle of the form [X Y width height] in the graphics screen, you have to position the cursor in its upper left corner, then drag to its opposite lower right corner. To do this you can also make use of the Up, Left, Right and Down keys


See also...

Function Keys F1 to F12


See also...

Buttons on the bar.


See also...

Left Mouse Button

Right Mouse Button


Xcor, Ycor...

are two numbers X and Y specifying the current position of the turtle. If you close the Change Turtle Dialogue with the Do it! button, these two numbers become the turtles new home position.


Set Heading Button...

opens the Turn Chooser, in which you see the current heading of the turtle. If you close the Change Turtle Dialogue with the Do it! button, this number becomes the turtles basic heading.


Do it! Button...

confirms all settings in the dialogue window and closes it.


Write it! Button...

is always disabled in this dialogue, because the window was opened interactively by the right mouse button through the Shortcuts Menu.


Four Check Boxes...

Here you can view and modify the following settings:

Pen Down check box: the pen can be up or down. The state of the check box reflects the current state of the pen and can be changed,

Show Turtle check box: the turtle can be shown or hidden. The state of the check box reflects the current state of the turtle and can be changed,

Make Active check box: if the turtle is active, this check box is disabled and cannot be changed. Otherwise, inactive turtle can be made active from here,

Set Frame Mode check box: if not checked, the turtle is using the standard mechanism for showing its heading through the corresponding frame. Otherwise it is an animated turtle, see SETFRAMEMODE. This setting can be modified from here.


Coordinates [X1 Y1 W H]

This allows you to get the coordinates of a rectangle. The first two numbers are the position of the upper left corner. The third number is the width. The last number is the height of the rectangle.

These numbers are put in a list on the command line.

This is very useful for commands like INSIDE?, OUTSIDE? and CODEAREA.


Copy Screen...

copies the actual contents of the graphics screen, i.e. without the shapes of shown turtles, into the Windows Clipboard. From there it can be pasted either back into SuperLogo or into any other Windows application able to process bitmaps.


Paste Screen....

loads the current contents of the Windows Clipboard into the graphics screen. If the  contents of the Clipboard are not a bitmap, Paste Screen command is disabled. Current width and height of the graphics screen is set to the actual size of the loaded bitmap. If its size is smaller than standard settings of Logo Main Window, loaded bitmap is placed either to the upper left corner of the screen or is centred in the Main Window according to the current SETGS settings.


Turtle: Pen Up / Pen Down

If the current pen mode of the turtle is down, the command is Turtle: Pen Up and vice versa. Here you can change the setting by turning the check box on or off.


Control Menu

This menu contains commands that allow you to manipulate, re-size or close the application window and is useful when you are not using mouse.

  Restore	restores application window to its original size,

  Move	lets you move the window using keyboard arrows,

  Size 	lets you re-size the window using keyboard arrows,

  Minimise	reduces the application to an icon,

  Maximise	enlarges the application to full screen,

  Close	closes and quits the application,

  Switch to...	switches to the Task Manager's list of running applications.

Restore, Move, Size, Minimise, and Maximise can be used by clicking or double-clicking the mouse. To access Control Menu, you can also press Alt+Space bar.


Parts of the Main Window

SuperLogo Main Window is an ordinary Windows application window. The largest part, called the working area, is divided horizontally into two parts (panes):

Text Screen

Graphics Screen

A horizontal bar which splits the working area into two screens can be dragged or moved with Set Screen... in the Options Menu.


File Menu Commands (in the Main Window)

If you open the File Menu in the main window of SuperLogo, you will see commands related to projects:

Commands

New Project

Open Project...	F3

Save Project	Shift+F2

Save Project As...	F2

Set Path...

Choose a Demo Project	F11

Choose a Problem...	F8

Run Startup	Ctrl+F9

Load Screen...

Save Screen As...

Print Graphics Screen

Print Text Screen

Print Memory

Printer Setup...

Exit SuperLogo	Alt+F4


More about...

More information about File Menu Commands in the Main Window of SuperLogo.


New Project

Brings up a warning box with Do you want to erase everything in the Memory? If you choose Yes, Logo erases all memory objects and all turtles. It also clears the graphics screen and resets SuperLogo as if it were started again.

After erasing all memory objects, all SuperLogo settings are changed to their basic values.


Open Project...
Open Project...	F3

is used to open an existing project. Open Project dialogue box appears on the screen. It consists of several list boxes, buttons, and check boxes to set up the project.

Click on a part of the image for more information.

------------------------------------------

Button:

Functionkey:	F3


Project Name...

Here you select or type the name of the file you want to open.


List Files of type....

The projects in SuperLogo have the extension *.lgp.


Drives

If your project is located on a floppy disk, choose a: or b:


Directories

Default directory is PROJECT.


Info

Here you can read additional information about the project, like filesize and date. There may be more information in the text box about the project. This information can be defined when saving a project..


Options

You can define a number of extra options here.

Click on a part of the image for more information.


Complete Project

The complete project will be opened.


Screen

Set this option if you want the screen to be shown.


Procedures

Set this option if you want to load the project's procedures.


Variables

Set this option if you want the project's variables to be loaded.


Properties

Set this option if you want all properties of a project to be loaded.


Turtles

Set this option if you want the turtles in the project to be loaded.


Bury Them

Set this option if you want all procedures to be buried.


Add to memory (no erase)

Normally all user defined objects are erased from memory when a project is opened. Setting this option will prevent that.


Run STARTUP

If a project has a procedure named Start it will be executed automatically.


Ignore errors

This option ignores any errors there may be in a project.


Save Project
Save Project	Shift+F2

If your project has already been saved by Save Project As..., its Name or its Title appears in the title bar of the Main Window. If you select Save Project command now, the current state of the project is saved - with the same options as specified in the previous Save Project As... process.

When you save a project for the first time, Logo automatically displays the Save Project As... dialogue. If you want to save the same project with a different Name, Title, or any other possible options, you have to select Save Project As...

Function Keys:	Shift+F2


Save Project As...
Save Project As...	F2

Is used to save and name your project. The boxes in the Save Project As dialogue box make it possible to specify all the settings you need. To save changes in a project which has already been saved use Save Project.

Click on a part of the image for more information:

----------------------------------------

Button:

Function key:	F2


Project Name...

Type the name for your project here. If a file with the same name already exists it will be overwritten.


Save File as Type

Projects in SuperLogo have the extension .LGP.


Drives

Choose the drive where you want to save your project


Directories

Select the directory where you want to save your project. The default directory is PROJECT.


Info


Text

You can type a description of your project here.


Options

Opens the window Options for Save Project.

Click on a part of the image for more information.


Complete project

Set this option if you want to save the whole project.


Screen

Set this option is you want to save the graphics screen in the project.


Procedures

Set this option if you want to save all procedures in the project.


Variables

Set this option if you want to save all variables in the project.


Properties

Set this option if you want all properties saved in the project.


Turtles

Set this option if you want to save all the turtles you made in the project.


Save also Buried Objects

Set this option if you want to save all buried objects in a project.


Create .ICO File

If this option is selected and a variable with the name ICON exists in memory, a file with the extension .ICO with the same name as the project will be created.


Add as Windows Application

If this option is selected the project will be added to the program folder of SuperLogo.


Title

Here you can add a title for your program. The title will appear in the title bar of SuperLogo.


Program Name

Here you can add the name of your program to the SuperLogo folder.


Set Path...

This command makes it possible to specify and inspect the current work directory. It opens the Set Path dialogue box with the following options:

Path

You cannot modify this line. It will show the current work directory.

Files

Here you see the files located in the work directory.

Directories

Select the new work directory here.

Drives

Select the drive for the new work directory.


Choose a Demo Program...
Choose a Demo Program...	F11

Opens a Demo Projects dialogue box, which allows you to choose any demo project stored in the DEMO subdirectory. If there are no projects stored in this subdirectory, a message appears on the screen saying: I Have No Demo Projects Defined, when you choose this command.

Demo projects always start to run immediately after they are opened.

How to make your own demo project

----------------------------------------

Button:

Function key:	F11


Choose a Problem...
Choose a Problem...	F8

Opens the Problems dialogue box which lists titles of all problems.

After choosing a Problem from the list, a window with its text appears on the screen and remains there until it is closed.


Run Startup
Run Startup	Ctrl+F9

Runs the procedure Start.

Shortcut Keys:	Ctrl+F9

Is equivalent to typing STARTUP command directly in the Text screen.


Load Screen...

Loads a new bitmap into the graphics screen. This could be a drawing you made with paint or paintbrush.

The Load Screen... dialogue box opens. After choosing a file, current width and height of the graphics screen is set to the bitmaps actual size, see LOADSCREEN.

Options in the dialogue Load Screen

Filename

Type the name of the file you want to open. This list contains files with the extension .BMP.

List files of type

Only shows "Bitmap Files", files with the extension .BMP.

Drives

Select the drive where the bitmap is located.

Directories

Select the directory where the file is located.

Preview

If this option is selected you will see a preview of the selected file


Save Screen As...

Saves the current contents of the graphics screen.

The saved bitmap can then be used in a program such as Paint or Paintbrush.

Options in the dialogue Save Screen as

Filename

Type the name of the file you want to open. This list contains files with the extension .BMP.

List files of type

Only shows "Bitmap Files", files with the extension .BMP.

Drives

Select the drive where you want to save the bitmap.

Directories

Select the directory where you want to save the bitmap.


Print Graphics Screen

Prints the current contents of the graphics screen. Opens Print Graphics Screen dialogue box in which you see and/or change the following settings:

With turtles- this will print all visible turtles,

Resolution - this sets the print quality. This depends on the printer you use,

Copies - the number of copies wanted,

Collate - the copies are printed in page order,

Print To File - prints the contents of the graphics screen to a file. Printmanager will ask you for a name for the file,

Options Button - opens the dialogue Printer Setup,

Margins Button - opens the dialogue Margins.


Margins

Here you specify the margins for the printout.


Print Text Screen

Prints the current contents of the text screen. Opens Print Text Screen dialogue box in which you see and / or specify following settings:

Resolution - this determines the print quality. This depends on the used printer,

Copies - type here the number of copies wanted,

Collate - the copies are printed in page order,

Print To File - prints the contents of the text screen to a file. Printmanager will ask you for a name for the file,

Options Button - opens the Printer Setup dialogue,

Margins Button - opens the Margins dialogue.


Print Memory
Print Memory...

This command makes it possible to print definitions of the user-defined objects currently stored in the Memory Window.

It is equivalent to the Print Objects... command of the File Menu in the Memory Window if you choose the All Objects option in that dialogue. Print Memory is disabled whenever there are no memory objects.


Print Setup
Printer Setup...

Opens standard Windows Print Setup dialogue box in which you specify:

  Printer -  which printer is active,

  Orientation of the paper (Portrait or Landscape),

  Paper - its Size and its Source on the printer,

  Options  - specifying Dithering, that is, the way graphics will be printed, Intensity Control, that is the darkness of graphics and text, and Print True Type as Graphics option.


Exit Logo
Exit SuperLogo	Alt+F4

Is used to close your Logo session. Logo prompts you to save your work before ending the session.

----------------------------------------

Shortcut:	Alt+F4, Alt+X

Mouse Shortcut:	Double-click Control Menu icon


Edit Menu Commands (in the Main Window)

The commands in this menu are used to operate the clipboard for cutting, copying and pasting of text in the text screen.

Commands

Cut (Ctrl+X): is the same as the command Cut in the Edit Menu of the Object Editor,

Copy (Ctrl+C): is the same as the command Copy in the Edit Menu of the Object Editor,

Paste (Ctrl+V): is the same as the command Paste in the Edit Menu of the Object Editor.


Window Menu Commands (in the Main Window)

If you open the Menu Window of the Main Window you will see a number of commands to adjust the Main Window, split the screen, etc.

Commands

Graphics Screen	F5

Split Screen	F6

Text Screen	F7

Clear Graphics

Clear Text

Clear Both

Show / Hide Memory	F4

Show / Hide Speed Bar

Next Window	Ctrl+F6

Cascade


Meer over...
More about...

More information about Window Menu Commands on the SuperLogo-Main Screen


Graphics Screen
Graphics Screen	F5

Sets the entire Main Window to graphics screen.

Text screen is not displayed, although its contents is not lost and is still active, responding to anything you type. If you reset the Main Window to display the text screen only with the Text Screen command in the Window Menu, or with TEXTSCREEN, it will contain the most recent contents. The same is true if you set the window to display both screens with the Split Screen menu command or SPLITSCREEN .

----------------------------------------

Button:

Functionkey:	F5

SuperLogo Language	:	GRAPHICSCREEN


Split Screen
Split Screen	F6

Sets the Main Window to both graphics screen and text screens.

Current contents of both screens are not affected by this command, see SPLITSCREEN, GRAPHICSCREEN, and TEXTSCREEN. The Split Screen command doesn't change size of the graphics screen, it only affects how much of it you can see. It is still working and all turtle commands will be carried out on it.

Sizing and Scrolling Graphics Screen

The number of lines displayed in the text screen can be set with Set Screens...  or the Options Menu.

----------------------------------------

Button:

Functionkey:	F6

SuperLogo Language:	SPLITSCREEN


Text Screen
Text Screen	F7

Sets the entire Main Window to text screen.

Text screen now covers the working area of the Main Window completely. Graphics screen is not displayed, but its contents are not lost. All active turtles continue their drawing there. If you later choose Graphics Screen or Split Screen, its most recent contents will be displayed.

----------------------------------------

Button:

Functionkey:	F7

SuperLogo Language:	TEXTSCREEN


Clear Graphics

Clears the contents of the graphics screen by filling it completely with currently set background colour. When Logo is started, the background colour is always white. To change it, use SETBACKGROUND.

When clearing the graphics screen, each active turtle is moved (without drawing a line) to its home position and basic heading, see MAKETURTLE.

-------------------------------------------------

SuperLogo Language:	CLEARSCREEN


Clear Text

Clears the text screen by filling it completely with currently set text screen background colour (it is normally white, to change it use SETTC). Then it prints the prompt, which is normally ?, but can be redefined by SETPROMPT.

--------------------------------------------

SuperLogo Language:	CLEARTEXT


Clear Both

Clears both graphics screen and text screen. Graphics screen is filled completely with currently set background colour, which is defined by SETBACKGROUND. Text screen is filled completely with currently set text screen background colour (it is normally white, to change it, use SETTC).

Clear Both command is equivalent to selecting  Clear Graphics and Clear Text commands in the Window Menu.


Show / Hide Memory
Show / Hide Memory;   F4

Opens (if it is currently closed) or closes (if it is currently open) the Memory Window. In it you can view, create, modify, or debug user-defined memory objects.

----------------------------------------

Button:

Functionkey:	F4


Hide / Show Speed Bar

Displays (if it is currently hidden) or hides (if it is currently displayed) the Speed Bar.


Next Window
Next Window	Ctrl+F6

Sometimes you have more than one window open in SuperLogo, for example, Memory Window, one or even more windows with texts of problems to be solved, File Editor Window etc. Next Window command switches from one to the other.

----------------------------------------

Functionkey:	Ctrl+F6


Cascade

If several SuperLogo windows are open at the same time (for example, Memory Window, one or even more windows with texts of problems to be solved, File Editor Window etc.) you may need to arrange them so that none of them is completely covered by another.


Options Menu Commands (in the Main Window)

The commands in this menu allow you to adjust the size of the graphics screen and the text screen. You can also decide how error messages are shown, etc.

Commands

Set Screens...

Errors to Pop-Up Window

Help for Kids

National Version

Auto SetPath

Stepping

Highlight Primitives

Indent in Editors


Meer over...
More about...

More information about Options Menu Commands on the SuperLogo-Main Screen.


Set Screens ...

Opens Set Screens dialogue box in which you set the sizes and other features of both graphics screen and text screen.

Options in the dialog Set Screens

Graphics

Here you define:

Width - a value between 8 and 2048,

Height - a value between 8 and 2048,

Centered - centers the graphics screen in the Main Screen,

Has Scroll Bars - this option adds scroll bars to the screen.

Text

Here you define:

The number of visible lines in the text screen. Maximum is about 24 or 25, depending on the screen used.

Default button

Press this button to change all settings back to their default values..

----------------------------------------

Special shortcut:	to change the number of lines in the text screen you can drag the separation line between the text screen and the graphics screen.


Errors to Pop-Up Window

Initially turned on. If an error occurs, a pop-up Error Window opens with one or two sentences describing and explaining the reason why Logo has a problem.

If you deselect the command (i.e. when the option is turned off), all error messages are printed only in the text screen.


Help for Kids

Is normally turned off. In such case the normal help file will be used.

If you select the command the special Help for Kids will be used. This helpfile contains the most important subjects and 100 SuperLogo Commands used by children.


National Version

Serves to turn on and off the option to communicate with Logo in alternative national language. When this option is turned on, you can use both:

  standard English names for all Logo basic procedures, or

  their native equivalents, which is more natural for younger users.

Thus you can equivalently type in any of the following instructions:

? FORWARD 50

? FD  50

? VOORUIT 50	; in Dutch version

? VT  50	; in Dutch version

When the option is turned off, Logo understands only standard English names for basic procedures.

  SuperLogo Language:  SETLOGO


Auto SetPath

This option is normally turned off, which means that loading a project or loading an image doesn't modify the actual path. If it is selected, however, each Open Project command updates the actual work directory and each LOADIMAGE operation updates the actual image path. To change this setting from a program, use SETPATH command with the "IMAGE as its first input.

Updating the path means that the next Open Project command or LOADIMAGE operation will use the same path as specified in the last case.


Stepping

This option is turned off on start-up. If it is selected, the stepping mode is turned on. In this case, whenever Logo is to carry out any of the commands FORWARD, BACK, LEFT or RIGHT, it stops and opens the I am Going To Do Window.

Example:

REPEAT 4  [FORWARD 10 RIGHT 90]

SuperLogo displays a small dialogue:

Here it says I am Going To Do FORWARD 10

Click on OK The turtle will move 10 steps forward.

Then you will see I am Going To Do RIGHT 90. Click on OK again.

If you click the Go button, SuperLogo will execute the remaining steps.

If you click the Stop button, the remaining steps won't be executed.


Highlight Primitives

Is normally turned on, which means that all Logo language procedures' names and all words with special meaning will be highlighted with a different colour when typed in or displayed either in the Object Editor or in the File Editor.


Indent in Editors

Is normally turned on, which means that when you press Enter key either in the Object Editor or in the File Editor, Logo automatically indents following empty line so that it starts in the same column as the previous line.


Help Menu Commands (in the Main Window)

If you choose the Help Menu you will find commands who will tell you all about SuperLogo.

Commands

Contents

OpensSuperLogo Help. Here you will see all important subjects in the Help file. You can click the green, underlined words to jump to other topics.

Button:

Functionkey:	F1

Search for Help on...

Opens the dialog where you can search for a command or other topic.

How to use Help

Shows the Windows Help about Help.

List of Procedures

Shows an alphabetical list of all SuperLogo-commands.

Categories of Procedures

Shows a list with all SuperLogo-procedures.

Main Window

Opens SuperLogo-Help with help on the Main Screen of SuperLogo.

About SuperLogo...

Opens the About dialog with the copyright information.


How to Edit in the File Editor Window
File Editor

This is a difficult command and isn't

explained in the Help for Kids


File Menu Commands (in the File Editor)

This is a difficult command and isn't

explained in the Help for Kids


Edit Menu Commands (in the File Editor)

This is a difficult command and isn't

explained in the Help for Kids


Search Menu Commands (in the File Editor)

This is a difficult command and isn't

explained in the Help for Kids


Options Menu Commands (in the File Editor)

This is a difficult command and isn't

explained in the Help for Kids


Execute Command (in the File Editor)

This is a difficult command and isn't

explained in the Help for Kids


New (in the File Editor)
New


Meer over...
More about...

More information about File Menu Commands of the File editor.


Open... (in the File Editor)
Open


Typing Instructions in the Command Line
Typing Logo Instructions in the Command Line

You work with SuperLogo by giving instructions through the command line:

in the text screen right next to the prompt you type one or more Logo instructions separated by a space,

each instruction is a command, some with values or expressions as its inputs,

each expression (separated from others by a space) may be either a simple value like 23, or a more complicated expression which must be first evaluated to find its value, like 23 + 5 * 7,

if an error occurs while your instruction is carried out, Logo interrupts the process and prints an error message,

if the instruction is successfully completed, the prompt is printed in the following line. It lets you know that Logo is ready for your next instruction.

First word of any instruction is always the name of a command. Operations are only used within the expressions describing the inputs to the command. If you leave out the command, Logo will calculate the value of the expression but won't do anything with it:

3 * 7	; MESSAGE: I don't know what to do with 21

PRINT 3 * 7	; 21 is the result of 3 times 7


Turtles and Turtle Geometry

SuperLogo Main Window is divided horizontally into two parts - graphics screen and text screen. Logo can show either both screens at once or only one of them. However, it always preserves the contents of the other one.

In the graphics screen there are one or more small graphics cursors called turtles. Many Logo procedures command turtles - they make them move in the graphics screen and draw with their pens. Other procedures change the turtles' settings (their positions, pen colours, their shapes etc.). These are called Turtle Graphics. Let's start with only one turtle:

Turtle's Shape

What Makes a Turtle

Procedures with Turtles

Finding Turtle's Settings

Multiple Turtles


Multiple Turtles

In SuperLogo you can create up to 4000 turtles. However, when Logo is started, there is only one turtle named 0. You can create other turtles with MAKETURTLE  any time and you can erase them with ERASETURTLE. Any turtle is either active or not active at any one time. Logo keeps track of its turtles in two lists:

      ALLTURTLES	- list of all turtles,

      WHO	- list of all currently active turtles.

There are two important rules when working with multiple turtles:

any command addressing a turtle (like moving it along the screen) is carried out in parallel by all active turtles,

any operation finding any setting (like turtle's position or its pen colour etc.) outputs current settings of the first active turtle. If there is no active turtle, an error occurs.

To learn more about multiple turtles, study these commands:

      TELL	- to change the list of active turtles,

      ASK	- to get a list of turtles to do something,

      EACH	- to make all active turtles do something one by one.


Splitting the Main Window into Two Screens

SuperLogo language provides us with commands which make Logo show either only the graphics screen, or only the text screen or both together. Some other commands define the size of each, when the screen is split into two parts:

GRAPHICSCREEN	the entire Main Window is set to graphics,
TEXTSCREEN	the entire Main Window is set to text,
SPLITSCREEN	both screens are depicted,
SETTS	sets size of the text screen,
SETGS	sets size of the graphics screen
To find current settings, use GETGS and GETTS . For both screens there are some more settings, like the colour of its background, colour of text printed into the text screen, text cursor position, prompt etc. The Command line can never be moved outside the text screen.


Turtle Shape

To show a turtle in the graphics screen you use any image, which is a special SuperLogo object. However, a turtle's shape is not a part of the graphics screen contents - imagine it is a little bit above the screen, which means it can move around the screen without erasing the contents of the screen.

How to Use Frames in an Image to define the Shape of a Turtle


Turtle Settings

Each SuperLogo turtle has these settings:

name, which can be any word,

home position,  the position where it was created,

basic heading,  its heading when it was created,

current position in the graphics screen represented by its Cartesian co-ordinates [X Y], where position [0 0] is in the middle of the Main Screen,

current heading, which is a number (in degrees) between 0 and 360,

pen state, that is, whether its pen is down, up, erasing, or reversing, current pen colour, current pen width and current pen pattern,

shape that represents the turtle in the graphics screen,

whether its shape is currently hidden or shown,

whether it is active or not,

how the frames of the shape are used: do they show the turtle's current heading or are they used for animation,

name and size of a font with which the turtle can write any text on the graphics screen,

whether it is in  WRAP or WINDOW mode, that is, what the turtle does when it reaches  the border of the screen.


See also...

Procedures with turtles

Finding a Turtle's Settings


Procedures With Turtles
KProcedures With Turtles

SuperLogo provides the following commands to work with a turtle:

MAKETURTLE creates a new turtle,

ERASETURTLE erases a turtle,

SETSHAPE sets a new shape for the turtle,

GETSHAPE to get current turtle's shape in the form of an image.

The most important turtle geometry procedures are:

FORWARD, SETX, SETY, SETXY, SETPOS, HOME to change turtle's current position,

LEFT, RIGHT, SETHEADING to change turtle's current heading,

PENUP, PENDOWN, PENERASE, PENREVERSE, SETPEN, SETPENCOLOUR, SETPENWIDTH, SETPATTERN to set new pen state, i.e. whether the turtle's pen is up, down, erasing or reversing, then its colour, width, and pattern,

SHOWTURTLE, HIDETURTLE to show or hide the turtle on the graphics screen,

SETTTEXT, TTEXT to set a font in which turtle will write text onto the graphics screen,

WRAP, WINDOW to set the turtle's behaviour on the border of the graphics screen.

To see the complete list, see:


See also...

Category Drawing with the Turtle


Operations to Find Turtle's Characteristics

This is a difficult command and isn't

explained in the Help for Kids


More about...

More information about Fundamentals of SuperLogo.


More about...

More information about Turtles and frames.


Types of Data

Both primitive and user-defined commands have effects on their inputs. In SuperLogo data can be words ( symbolic words with letters and numeric words with numbers), images or lists. For some words you can define properties. Besides data objects,  Logo works with special graphics objects called turtles.

Words

Signs with special meanings

Operations on words

Numbers

Lists


More about...

More information about Kinds of input in SuperLogo.


Operations on Words

SuperLogo provides many commands to work with words. Among them the most important are:

WORD	to join two (or more) words,
WORD?	to check whether its input is a word,
ELEMENT	to get the n -th character of a word,
FIRST	to get the first character of a word,
LAST	to get the last character of a word,
BUTFIRST	to get the same word without its first character,
BUTLAST	to get the same word without its last character,
COUNT	to find the number of characters of a word,
EMPTY?	to check whether its input is an empty word.

To get the complete list, see Word and List Operations


Words
Words - Building Bricks of Logo

A word is a sequence of characters (letters A, B, ... a, b, ..., digits 0, 1, ... 9, punctuation marks and special characters). Words are used like bricks to build more complex data - lists and to set properties of another words. They are also used to name user defined procedures, variables, and turtles.

Words containing only digits (and decimal point and + or - signs) are called numbers.

About Words

How long can words be


About Case in Words
Case in Words...

SuperLogo is normally case-insensitive, that is, it considers words like PETER and peter identical.


How Long the Words Can Be
Length of Words...

The shortest word is an empty word - its length is 0, it contains no characters. It is recognised by EMPTY?. In programming, an empty word is quite a common and useful thing.

The maximum length of word is 65535 characters. However, very long words use lots of memory space.


Characters with Special Meanings

Some characters have special meanings in SuperLogo. Normally, they are not considered to be part of any word - they are said to be input delimiters. For example, when you type:

? PRINT "AB-9	; MESSAGE: - doesn't like AB as input

An error occurred, because Logo finds AB-9 to be two words, AB and 9 with  the minus (-) operation in between. Here is the list of special characters:

space - it separates words,

square brackets [ and ] - they enclose lists,

brackets ( and ) - they either specify the order of calculations, or enclose procedure calls with other than basic number of inputs, like (WORD "A "B "C),

operators +, -, *, /, <, <=, <>, =, >, >=,

quotation mark " - it identifies the beginning of a word,

semi-colon ; - it identifies text comments in a user-defined procedure definition,

back slash \ - it is used as an escape character to specify that the following character should not be considered special, for example "AB\-9 is one word.

To learn, how to use special characters as normal ones, see more
on Escape character \.


Numbers - Special Logo Bricks

Numbers are special kind of words consisting only of digits 0, 1, ... 9, decimal point . and  + or - signs. Numbers are words as well, you can use any word operations with them:

? PR  57 - WORD 3 7	; 20, see PRINT and WORD

? BF 12 * 12	; 44, see BUTFIRST


Some Numeric Operations

Here are some of them. To get the complete list, see Numeric Operations.

NUMBER? - to find whether an input is a number,

<, > , <=, >=, =, <> -  to find whether the first input is less than, greater than, less than or equal to, greater than or equal to, or not equal to the second input,

+, -, *, / - number operations to add, subtract, multiply, or divide its inputs,


Images

This is a difficult command and isn't

explained in the Help for Kids


Lists

A list is a sequence (possibly empty) of words, numbers, images or other lists enclosed in square brackets. Here are some examples together with short explanations:

[ ]	the empty list, i.e. list with no elements,
[1  2]	list with two elements,
[A  3  B]	list with three elements,
[ [ ] [ ] ]	list with two elements, which are the empty lists,
[ [ ] [1  2] 666 [A  3  B] ]	list with four elements: [ ], [1  2], 666, and [A  3  B]
[ [ [ [ [ ] ] ] ] ]	list with one element, which is a list with one element, which...
SuperLogo provides several primitive procedures to work with lists; here are some of them. Notice that many of these procedures are polymorphic:

LIST?	to find whether its input is a list,
EMPTY?	to find whether its input is an empty list,
LIST	to construct a list,
SENTENCE	to construct a list,
FIRST	to output the first element of a list,
LAST	to output the last element of a list,
ITEM	to output n -th element of a list,
BUTFIRST	to output all but the first element,
BUTLAST	to output all but the last element,
COUNT	to find the number of elements,
FPUT	to add new first element,
LPUT	to add new last element.


Procedures to Work with Properties

This is a difficult command and isn't

explained in the Help for Kids


Logo Procedures are Plymorphic
Logo Procedures are Polymorphic

This is a difficult command and isn't

explained in the Help for Kids


Sounds
Sounds and Multimedia

This is a difficult command and isn't

explained in the Help for Kids


Inputs and Outputs of Logo Procedures

Many Logo procedures - both primitive and user-defined - get an additional information through their inputs.


Rules to Evaluate Inputs

This is a difficult command and isn't

explained in the Help for Kids


Basic and Variable Number of Inputs

Any Logo primitive procedure has specific number of its inputs. Some procedures, however, accept more than one input. In this case, brackets must be used to tell Logo which input expressions belong to this particular procedure.

Let's take the command PRINT The number of inputs is 1:

PRINT "SEE	; SEE

PRINT "SEE "YOU	; MESSAGE: I don't know what to do with YOU

(PRINT "SEE "YOU)	; SEE YOU


Conditional Procedures
Conditions and Predicates, Logical Connectives

This is a difficult command and isn't

explained in the Help for Kids


Files Management
Working with Files

Although the main idea behind SuperLogo is producing  projects, it is possible to save information (and read it back) in other kinds of files.

File Names

SuperLogo recognizes different File Extensions

Procedures to Load and Save Files

How to read from a File and Print to a File


Command to load a screen
Loading a screen

With the command below you can load a bitmap.

LOADSCREEN


Input Syntax

The following are the different kinds of input:

number , sometimes the type and range,

sign in front of a word,

word, sometimes with extra data

input, for every word or list,

list, sometimes with extra data


How to Read from a File and Print to a File

This is a difficult command and isn't

explained in the Help for Kids


Conditional Procedures, IF
Conditional Procedures

This is a difficult command and isn't

explained in the Help for Kids


TEST, IFTRUE, and IFFALSE

This is a difficult command and isn't

explained in the Help for Kids


Repeat Commands

The basic Logo repeat primitive procedure REPEAT expects two inputs:

the first of them is a number setting the number of times something will be repeated,

the second  is a list of Logo Instructions.

Second input is executed as many times as specified by the first input. For example:

? MAKE "A "X

? REPEAT 5 [MAKE "A WORD "X :A PR :A]

REPEAT will execute the list of instructions five times:

XX

XXX

XXXX

XXXXX

XXXXXX


RUN Procedure

This is a difficult command and isn't

explained in the Help for Kids


How to Define Your Own Procedures

You can define your own procedures with TO ,  DEFINE , in the Object Editor started with EDIT Logo primitive command, or in the same editor started from the Memory Window.

Parts of the Procedure's Definition

Making a procedure in the command line


More about...

More information about Programming in SuperLogo.


More about...

More information about How to define your own procedures


Parts of the Procedure's Definition

Any procedure's definition created with TO must consist of three parts:

heading line starting with TO, which is followed by the procedure's name, and zero, one, or more names of the procedure's inputs,

one or several lines acting as the procedure's body - these lines describe procedure's actions, its effect (if it is a command), or the way its output is calculated (if it is an operation),

final line containing only END  which ends the definition.


How to Define Procedure with Variable Number of Inputs

This is a difficult command and isn't

explained in the Help for Kids


Writing a procedure in the command Line

As well as defining a procedure in the Memory Window you can define it directly in the command line with the TO command. After typing TO with the name of a new procedure (and its inputs), Logo switches to procedure definition mode, which is shown in the text screen by the > prompt. Following lines are recognised as lines of the procedure's definition.  You switch back to standard dialogue mode when you type in END  on a separate line:

? TO FIRST.EXAMPLE

> MAKE "L [ ]

> REPEAT 5 [MAKE "L FPUT "A :L PRINT :L]

> END

Now FIRST.EXAMPLE procedure can be used in the command line:

? FIRST.EXAMPLE

A

A A

A A A

A A A A

A A A A A

This procedure doesn't expect any input. Instead, it uses one variable L. The SECOND.EXAMPLE procedure expects one input named X:

? TO SECOND.EXAMPLE :X

> IF EMPTY? :X [STOP]

> PR :X

> SECOND.EXAMPLE BF :X

> END

Notice that SECOND.EXAMPLE calls itself in its last line. This kind of procedure is called recursive. You can now use it in the command line:

? SECOND.EXAMPLE "WORD

WORD

ORD

RD

D

? SECOND.EXAMPLE [this is a list]

this is a list

is a list

a list

list


Procedures TEXT and DEFINE

This is a difficult command and isn't

explained in the Help for Kids


How to Define Our Own Operations

This is a difficult command and isn't

explained in the Help for Kids


Comments in Procedures

Lines in a procedure with a semi-colon (;) are interpreted in a special way: text to the left of ; is a normal definition line, while text to the right of ; Logo treats as a comment and ignores it. In this way you can put some short explanations or notes into your definitions. For example:

? TO PRINT.ALL :X

> IF EMPTY? :X [STOP]	; if the input is empty, stop

> PR :X	; otherwise: print :X and

> PRINT.ALL BF :X	; repeat for the input without first element

> END

?


See also...

How to define your own procedure?


Working with Procedures

This is a difficult command and isn't

explained in the Help for Kids


How and Why to Bury Our Own Objects
Buried Objects

This is a difficult command and isn't

explained in the Help for Kids


Logo Language Fundamentals

The basic building blocks of Logo are procedures. Logo provides nearly 300 primitive procedures; see Alphabetical List of Procedures. Programming in Logo consists of combining simple procedures into more complex ones. We call these procedures user-defined. Once you have written them, they work in the same as primitive procedures.

Typing instructions into the Command Line

Types of Data

Turtles and drawing with the Turtle

Sounds

Inputs and outputs of Procedures

Conditions and Predicates, Logical Connectives

Working with files


SHOW  7*3	; 21, in the text screen

FORWARD 10*2	; the same as FORWARD 20

SHOW PRODUCT 2  5	; 10


SHOW  2  +  3	; 5  in the text screen

FORWARD 10+30	; 40 steps forward

FORWARD SUM 10 10	; 10 steps forward


SHOW 5-2	; 3 in the text screen

FORWARD 100-30	; 70 steps forward

FORWARD DIFFERENCE 20 10	; 10 steps forward


SHOW 10 / 2	; 5 in the text screen

FORWARD 100/2	; 50 steps forward

FORWARD QUOTENT 100 2	; 50 steps forward


SHOW 3 < 30	; TRUE (in the text screen)

SHOW 30<3	; FALSE (in the text screen)


SHOW LESS 30 3	; FALSE (in the text screen)

IF 3 < 6 [SHOW "Yes] [SHOW "No]	; Yes (in the text screen)


SHOW 5  <=  10	; TRUE

SHOW 5<=10	; TRUE

SHOW 5  <=  5	; TRUE

SHOW 10 <=  5	; FALSE


SHOW 3 > 30	; FALSE

SHOW 30>3	; TRUE


SHOW GREATER? 30 3	; TRUE

IF 6 > 3 [SHOW "Yes] [SHOW "No]	; Yes


SHOW 10  >=  5	; TRUE

SHOW 10>=5	; TRUE

SHOW 5 >=  5	; TRUE

SHOW 5  >=  10	; FALSE


SHOW 10  <>  5	; TRUE

SHOW 10<>5	; TRUE

SHOW 5 <>  5	; FALSE


SHOW 5 = 5	; TRUE

SHOW 7=5	; FALSE

SHOW "Charles = "Charles	; TRUE

SHOW "Charles = "charles	; TRUE

SHOW "Charles = "John	; FALSE

SHOW [black red]  = [black red]	; TRUE

SHOW [black red]  = [black blue red]	; FALSE


SHOW ("Charles  = [Charles])	; FALSE

SHOW " = [ ] 	; FALSE

SHOW  27  =  "27	; TRUE


SHOW ALLTURTLES	; [0] if you haven't made your own turtle yet

MAKETURTLE "Fred [10 10 90]	; makes a turtle called Fred

SHOW ALLTURTLES	; [0 Fred]


MAKETURTLE "Monkey [10 10 90]	; makes a second turtle named Monkey

TELL ALLTURTLES	; activates all turtles

SHOWTURTLE	; shows all turtles

ASK "MONKEY [FORWARD 50]	; the turtle Monkey goes 50 steps forward

ASK [0 MONKEY] [FORWARD 100]	; both turtles go 100 steps forward

ASK "MONKEY [LEFT 90 FORWARD 50]	;


HOME	; turtle points North (unless you have set another value)

BACK 20	; turtle goes backwards twenty steps

REPEAT 4 [BACK 50 LEFT 90]	; the turtle draws a square backwards


SHOW  BUTFIRST  "LOGO	; OGO, the first letter of the word has disappeared

SHOW  BUTFIRST  [one two three]	; [two three], the first item has disappeared


SHOW  BUTLAST  "LOGO	; LOG, the last letter has disappeared

SHOW  BUTLAST  [one  two  three]	; [one two], the last item has disappeared


PENDOWN	; the pen is now on the paper

REPEAT 4 [FORWARD 50 RIGHT 90]	; draws a square

RIGHT 45	; the turtle is turned right 45 degrees

CLEAN	; erases the square, but the turtle remains on the screen


SETBACKGROUND 10	; the background is green

SETPENCOLOUR 12	; the pencolour is red

SETPENWIDTH 7	; you have now a thick line

FORWARD 50	; the turtle goes fifty steps forward

RIGHT 45	; the turtle goes 45 degrees to the right

FORWARD 50	; the turtle goes 50 steps forward

WAIT 200	; the turtle waits a moment

CLEARSCREEN	; the screen is cleared


SHOW 1000 * 10	; 10000, in the text screen

CLEARTEXT	; the text screen is erased


SHOW COUNT "sandra	; 5, the word Sandra contains five letters

SHOW COUNT [robert sandra]	; 2, two items

SHOW COUNT [sandra]	; 1, one item

SHOW COUNT [A  B  [C  D] ]	; 3, three Items: A, B and [C  D]


FORWARD DIFFERENCE 50 10	; the turtle goes 40 steps forward

SHOW DIFFERENCE 100 10	; 90, in the text screen


SETBACKGROUND 10	; the background is green

SETPENCOLOUR 12	; the pencolour is red

FORWARD 50	; the turtle goes 50 steps forward

RIGHT 45	; the turtle goes 45 degrees to the right

FORWARD 50	; the turtle goes 50 steps forward

WAIT 200	; the turtle waits a moment

DRAW	; the screen is erased, the turtle is put back in it's starting place


CLEAN

SETBACKGROUND 0

RAND

ERASETURTLE  ALLTURTLES

MAKETURTLE  0  [ ]

TELL 0

SHOWTURTLE


MAKETURTLE "ADAM [10 10 90] 	; the turtle ADAM is created

TELL ALLTURTLES	; all turtles are activated

SHOWTURTLE	; the turtle ADAM is shown

EACH [REPEAT 4 [FORWARD 100 RIGHT 90 WAIT 100]]	; first turtle 0 draws a square and afterwards turtle ADAM draws a square. Mind the brackets!


SHOW EMPTY? [machine]	; FALSE

SHOW EMPTY? [ ]	; TRUE

SHOW EMPTY? BUTFIRST [machine]	; TRUE

SHOW EMPTY? BUTFIRST "A	; TRUE


TO SQUARE	; makes the procedure square. The > prompt appears

REPEAT 4 [FORWARD 100 RIGHT 90]	; the commands to draw a square.

END	; end of the procedure


SHOW EQUAL? 5  5	; TRUE

SHOW EQUAL? 7 5	; FALSE

SHOW EQUAL? "Charles  "Charles	; TRUE

SHOW EQUAL? "Charles  "charles	; TRUE

SHOW EQUAL? "Charles  "John	; FALSE

SHOW EQUAL? [black red]   [black red]	; TRUE

SHOW EQUAL? [black red]   [black blue red]	; FALSE


MAKETURTLE "TRAIN 	; makes a turtle named TRAIN

MAKETURTLE "FLOPPY	; makes a turtle named FLOPPY

MAKETURTLE "CAR	; makes a turtle named CAR

SHOW ALLTURTLES	; [ 0 TRAIN FLOPPY CAR] shows all turtles

ERASETURTLE "FLOPPY	; erases the turtle FLOPPY

SHOW ALLTURTLES	; [ 0 TRAIN CAR] shows all turtles

ERASETURTLE [ TRAIN CAR ]	; erases the turtles TRAIN and CAR

SHOW ALLTURTLES	; [0] shows only turtle 0, the rest have been erased


SHOW (6=2+3)	; FALSE, because two plus three makes six


DRAW	; erases the screen

SETPENCOLOUR 5	; turns the pencolour to purple

SETPENWIDTH 4	; increases the penwidth

REPEAT 4 [FORWARD 50 RIGHT 90]	; draws a square

RIGHT 45 	; turns the turtle to point into the square

PENUP	; lifts the pen from the paper

FORWARD 10	; puts the turtle inside the square

SETFILLCOLOUR 3	; turns the fillcolour green

FILL 	; the square is coloured green


SHOW FIRST "LOGO	; L, the first letter of the word Logo

SHOW FIRST [one two three]	; [one], the first item of the list


FORWARD 35	; the turtle goes 35 steps forward


SHOW  FPUT "Super  [Logo]	; [Super Logo]

SHOW  FPUT "A  [B C D]	; [A B C D]

SHOW  FPUT [A B] [C D E]	; [[A B] C D E]


SHOW WORD "Super  "Logo	; SuperLogo


SHOW SENTENCE  [1  2]  [3  4]	; [1  2  3  4], the two lists are joined

SHOW  FPUT  [1  2]  [3  4]	; [[1  2]  3  4], the two lists are joined together into one

; list that contains one list ([1 2]) and two

; Items (3 and 4)


GRAPHICSCREEN	; the text screen is not shown anymore

WAIT 200	; wait

SPLITSCREEN	; the screen is back to normal


SHOW  GREATER?  3  30	; FALSE

SHOW  GREATER?  30  3	; TRUE


SHOW  (GREATER?  40  30  3)	; TRUE

SHOW  (GREATER?  40  3  30)	; FALSE

SHOW  (GREATER?  40  3  -30)	; TRUE


SETBUTTONS [[BACK] [FORWARD]] 	; puts commands on the buttons

SHOWBUTTONS	; shows the buttons

WAIT 400	;

HIDEBUTTONS	; hides the buttons


HIDESPEEDBAR	; hides the speedbar

WAIT 300	; waits a moment

SHOWSPEEDBAR	; shows the speedbar


SHOWTURTLE	; shows the turtle

FORWARD 100	; the turtle goes 100 steps forward

HIDETURTLE	; the turtle is hidden


SHOWTURTLE	; shows the turtle

REPEAT  90  [FORWARD 140  RIGHT 172]	; draws a shape

PENUP	; the pen is lifted from the paper

BACK 150	; the turtle goes 150 steps back

PENDOWN	; the pen is back on the paper

HIDETURTLE	; the turtle is hidden

REPEAT  90  [FORWARD 140  RIGHT 172]	; note the difference in speed


MAKETURTLE "CHARLES [20 0]	; makes a turtle named Charles

TELL "CHARLES	; activates Charles

SHOW ALLTURTLES	; [0  charles] in the text screen

SHOWTURTLE	; both turtles are shown

HIDETURTLE	; the turtle Charles is hidden

SHOWTURTLE	; the turtle Charles is shown again

TELL ALLTURTLES	; all turtles are activated

HIDETURTLE	; both turtles are hidden


CLEAN	; the screen is erased

FORWARD 100	; the turtle goes 100 steps forward

RIGHT 90	; the turtle turns 90 degrees to the right

HOME	; the turtle returns home


RIGHT 45	; the turtle turns 45 degrees to the right

FORWARD 100	; the turtle goes 100 steps forward

RIGHT 15	; the turtle turns 15 degrees to the right

FORWARD 50	; the turtle goes 50 steps forward

HIDETURTLE	; the turtle is hidden

HOME	; the turtle goes back to it's original position

SHOWTURTLE	; the turtle is shown again


IF 1<2 [SHOW [YES, THAT'S RIGHT]] [SHOW [TOO BAD, WRONG]]

IF 2<1 [SHOW [YES, THAT'S RIGHT]] [SHOW [TOO BAD, WRONG]]


SHOW ITEM 1 "robert	; r the first letter of the word

SHOW ITEM 2 "robert	; o the second letter of the word

SHOW ITEM [2 2] "robert	; ob starting from the second letter the next two letters

SHOW ITEM 3 [A B C D]	; C the third item of the list

SHOW ITEM [2 2] [A B C D]	; B C starting from the second item the next two items

SHOW ITEM 1 [[AB] [BC] [CD]]	; [AB] the first item


SHOW LAST "ALPHABET	; T, the last letter of the word "Alphabet

SHOW LAST [[MONKEY] [ELEPHANT][TIGER]]	;[TIGER], the last item of the list

SHOW LAST [TOM and ANNE]	;ANNE, the last item of the list

SHOW LAST ["ALPHABET]	;["ALPHABET], the last item of the list


CLEAN	; the turtle points North (up)

LEFT 90	; the turtle points to the West (left)

WAIT 300	; wait a moment

LEFT 90	; the turtle turns another 90 degrees and points South (downwards)

WAIT 300	; wait a moment

LEFT 180	; the turtle turns half a circle and points North again


SHOW LESS? 1  2	; TRUE, 1 is less than 2

SHOW LESS? 2  1	; FALSE, 2 is not less than 1

SHOW LESS? 4  4	; FALSE, 4 is equal to 4  and not less than 4


SHOW (LESS? 1  2  3)	; TRUE, 1 is less than 2 and 2 is less than 3

SHOW LESS? 1  2  3	; error message


SHOW LIST "Tea "Pot	; [Tea Pot]

SHOW LIST "A [B  C]	; [A [B  C]], one list of two Items

SHOW LIST ( 1 2 3 4)	; [1 2 3 4], one list of four Items

SHOW ( LIST "blue "red "black )	; [blue red black]

SHOW LIST "one [two three]	; [one [two three]]

SHOW LIST [one] [two three]	; [[one] [two three]]


SHOW SENTENCE [A B C] [D E]	; [A B C D E]

SHOW LIST [A B C] [D E]	; [[A B C] [D E]]


SHOW LIST? [A  B  C]	; TRUE, [A B C] is one list

SHOW LIST? "Robert	; FALSE, Robert is not a list but a word

SHOW LIST? 2+3	; FALSE, 2+3 is not a list but an operation

SHOW LIST? FIRST [A B]	; FALSE, A is the first item of a list but isn't a list itself


SHOW LIST? [ ]	; TRUE, [ ] is an empty list


LOADSCREEN "sky


SHOW LPUT 5 [ 1 2 3 4 ]	; [1 2 3 4 5], 5 is added as last item to the list

SHOW LPUT  "A  [ ]	; [A], A is added as last item to an empty list

SHOW  LPUT  [Y  Z] [W  X]	; [W  X [Y  Z]]


MAKETURTLE "ONE [-100 0 0]	; a new turtle named One

MAKETURTLE "TWO [100 0 180]	; a new turtle named Two

TELL [ONE TWO]	; activates new turtles

SHOWTURTLE	; shows both turtles


SHOW MEMBER? "Super "Superlogo	; TRUE, Super is a part of Superlogo

SHOW MEMBER? "log "Superlogo	; TRUE, Log is a part of Superlogo

SHOW MEMBER? "super "Superlogo	; TRUE, there is no difference between capital and small letters

SHOW MEMBER? "Superlogo "Super 	; FALSE

SHOW MEMBER? "Fred "Superlogo	; FALSE


SHOW MEMBER? "ABC  [A  AB  ABC  ABCD]	; TRUE

SHOW MEMBER? [ABC]  [ [A]  [AB]  [ABC] ]	; TRUE

SHOW MEMBER? [ABC]  [A  B  C]	; FALSE


SHOW NUMBER? 6	; TRUE

SHOW NUMBER? "6	; TRUE

SHOW NUMBER? 1+1	; TRUE

SHOW NUMBER? FIRST [6 8]	; TRUE


PENDOWN	; put the pen on the paper

FORWARD 50	; the turtle draws a line

PENUP	; takes the pen off the paper

FORWARD 50	; the turtle draws a line

PENDOWN	; the pen is on the paper again

FORWARD 50	; the turtle draws another line


SHOWTURTLE	; show the turtle on the screen

PENDOWN	; put the pen on the paper

REPEAT 4 [FORWARD 50 RIGHT 90]	; draws a square

PENERASE	; tells the turtle to erase

REPEAT 4 [FORWARD 50 RIGHT 90]	; the turtle erases the square


DRAW

SETPENWIDTH 10	; chooses a wide pen

REPEAT 4 [FORWARD 50 RIGHT 90]	; draws a square

PENERASE	; switches the pen to erase mode

SETPENWIDTH 1	; chooses a thin pen

FORWARD 50	; a  line is erased

PENDOWN	; the turtle switches back to draw mode

FORWARD 30	; draws a line


FORWARD 30	; the turtle draws a line

PENUP	; the pen is lifted from the paper

FORWARD 30	; the turtle draws no line


DRAW	; the screen is erased, turtle 0 is on the screen

RIGHT 50	; the turtle turns 50 degrees to the right

PRINT  FRAME	; 4, the fourth frame is on the screen


PLAYWAVE "ring.wav

(PLAYWAVE"c:\\windows\\tunes.wav "c:\\windows\\trumpet.wav)

PLAYWAVE [c:\\windows\\tunes.wav   c:\\windows\\trumpet.wav]


PRINT "Boy	; Boy

(PRINT "Boy "girl)	; Boy girl two words between ()

PRINT [come here]	; come here prints the list

(PRINT [come here][now] )	; come here now prints the two lists between ()


PRINTLINE "Boy	; Boy

(PRINTLINE "Boy "girl)	; Boy

; girl every word on a new line

PRINTLINE [come here]	; come

; here

(PRINTLINE [come here][now] )	; come

; here

; now


SHOW PRODUCT 2 30	; 60 (in the text screen)

FORWARD PRODUCT 10 10	; turtle moves 100 steps forward

SHOW (PRODUCT 2 10 10)	; 200 (in the text screen)


FORWARD QUOTENT 100 10	; the turtle moves 10 steps forward

FORWARD 100/2	; the turtle moves 50 steps forward

SHOW QUOTENT 1000 10	; 100, in the text screen


SHOW RANDOM 2	; 0 or 1, in the text screen

REPEAT 4 [SHOW RANDOM 5]	; 0, 1, 2, 3 or 4, in the text screen


SETBACKGROUND RANDOM 16	; the background is coloured at random (a number between 0 and 15)


MAKETURTLE "one	; Makes a turtle named One

MAKETURTLE "two	; Makes a turtle named Two

SHOW ALLTURTLES	; [0 one two ], shows the list of all turtles

REORDER [ two one]	; reorder the turtles

SHOW ALLTURTLES	; [two one 0], turtle Two is now the first turtle


REPEAT 3 [SHOW "Hello] 	; Hello

; Hello

; Hello

REPEAT 10 [FORWARD 10 WAIT 100]	; the turtle moves ten times ten steps forward

; and waits a moment ten times.


REPEAT 4 [RIGHT 90 REPEAT 4 [FORWARD 10 WAIT 100]]


CLEAN	; the turtle points upwards (North)

RIGHT 90	; the turtle points to the right (East)

WAIT 300	; wait a moment

RIGHT 90	; the turtle turns 90 degrees to the right and now points downwards (South)

WAIT 300	; wait a moment

RIGHT 180	; the turtle turns half a circle and points upwards (North) again


SHOW SENTENCE "Halibut "Sturgeon	; [Halibut Sturgeon] two words become one list

SHOW ( SENTENCE "blue "red "black )	; [blue red black]

SHOW SENTENCE "one [two three]	; [one two three]

SHOW SENTENCE [two three] "one 	; [two three one]

SHOW SENTENCE [A B C] [D E]	; [A B C D E]


SHOW SENTENCE "Halibut "Sturgeon	; [Halibut Sturgeon]

PRINT SENTENCE "Halibut "Sturgeon	; Halibut Sturgeon

SHOW SENTENCE [two three] "one 	; [two three one]

PRINT SENTENCE [two three] "one 	; two three one


SETBACKGROUND 12	; turns the background red


SETBUTTONS [[HIDEBUTTONS] [FORWARD 20]] 	; puts commands on the buttons

SHOWBUTTONS	; shows the buttons

HIDEBUTTONS	; hides the buttons


CLEAN	; erases the screen

SETPENCOLOUR 12	; sets the pencolour to red

REPEAT 4 [FORWARD 100 RIGHT 90]	; draws a red square

RIGHT 45	; the turtle turns 45 degrees to the right

PENUP	; the pen is lifted from the paper

FORWARD 2	; the turtle is moved inside the square

PENDOWN	; the pen is placed on the paper

SETFILLCOLOUR 14	; the fillcolour is set to yellow

FILL	; the square is filled


CLEAN	; erases the screen

SETPENCOLOUR 12	; sets the colour of the pen

REPEAT 4 [FORWARD 100 RIGHT 90]	; draws a red square

RIGHT 45	; the turtle turns 45 degrees to the right

PENUP	; the turtle is lifted from the paper

FORWARD 2	; the turtle is moved inside the square

PENDOWN	; the pen is put back onto the paper

SETFILLCOLOUR 14	; the fillcolour is set to green

SETFILLPATERN 3	; a diamond fillpattern is selected

FILL	; the square is filled with diamonds


CLEAN	; turtle points upwards

SETHEADING 180	; turtle points downwards

SETHEADING 90	; turtle points to the right


SETMOUSECURSOR  "disk


SETMOUSECURSOR 1	; the mouse pointer is set to an hourglass


SETPATTERN 2	;

PENDOWN	;

FORWARD 50	; draws a line with pattern 2


SETPENCOLOUR 9	; sets the pencolour to number 9  - blue

FORWARD 50	; draws a blue line

SETPENCOLOUR 10	; sets the pencolour to number 10 - green

FORWARD 50	; draws a green line


HOME	; puts the turtle in the middle of the screen

SETPENWIDTH 5	; sets the penwidth to 5 points

FORWARD 100	; draws a line

SETPENWIDTH 200	; sets the penwidth to 200 points

FORWARD 100	; draws a very thick line


DRAW	; puts turtle 0 on the screen

SETFRAMEMODE "TRUE	; turns on framemode

SETFRAME 5	; uses the fifth frame of turtle 0

FORWARD 100	; turtle moves forwards


SETFRAMEMODE "TRUE	;

SETSHAPE "clown	; the clown appears

REPEAT 1000 [SETFRAME FRAME+1]	; the propeller turns


CLEAN	; the drawing is erased

PENDOWN	; the pen is put onto the paper

LEFT 45	; the turtle turns to the left

SETPOS [ 100 100]	; moves the turtle to the position X=100, Y=100


SETSHAPE "car1	; the turtle takes the shape of a car


SETTC 15	; chooses white letters on a black background

CLEARTEXT	; turns the whole text screen black and white


SETTEXT "Arial [30 400 0]	; font Arial, 30 points, not bold, not italic

TTEXT "Hello	; the word Hello is in the graphic screen

FORWARD 40	; the turtle moves 40 steps forwards

SETTEXT "Times [30 400 0]	; font Times, 30 points, not bold, not italic

TTEXT [This is a list of words]	;

FORWARD 60	;

SETTEXT "Times [40 800 1]	; font Times, 40 points, bold, italic

TTEXT "Justoneword	;


DRAW	; erases the screen and moves the turtle to position [ 0 0]

SHOWTURTLE	; shows the turtle

PENDOWN	; the pen is put onto the paper

SETX 50	; moves the turtle to position [50 0]

RIGHT 45	; turns the turtle 45 degrees to the right

PENUP	; the pen is off the paper

SETX 100	; moves the turtle to position [100 0]


SHOWTURTLE	; shows the turtle

PENDOWN	;

SETXY 50 70	; moves the turtle to the position [50 70]

PENUP	;

SETXY 30 150	; moves the turtle to the position [30 150


SHOWTURTLE	; shows the turtle

PENDOWN	;

SETY 50	; moves the turtle to the position [0  50]

RIGHT 45	; turns the turtle 45 degrees to the right

PENUP	;

SETY 100	; moves the turtle to the position [0 100]


SHOW  "SUPERLOGO	; SUPERLOGO

(SHOW "SUPER "LOGO)	; SUPER LOGO

SHOW [ONE TWO]	; [ONE TWO]

SHOW [ONE [TWO THREE] [FOUR]]	; [ONE [TWO THREE] [FOUR]]


SHOW ALLTURTLES	; [0], there is only one turtle, the basic-turtle

SHOW POS	; [0 0], the position of the basic-turtle

POS	; error message


SETBUTTONS [[HIDEBUTTONS] [FORWARD 20]] 	; puts commands on the buttons

SHOWBUTTONS	; shows the buttons


SHOWTURTLE	; shows the turtle

SHOW SHOWN?	; TRUE, the turtle is shown on the screen

HIDETURTLE	; the turtle is hidden

SHOW SHOWN?	; FALSE, the turtle is not shown on the screen


HIDESPEEDBAR	; hides the speedbar

WAIT 300	; waits a moment

SHOWSPEEDBAR	; shows the speedbar


SHOWTURTLE	; shows the turtle

FORWARD 10	; the turtle moves 100 steps forward

HIDETURTLE	; the turtle is not shown


SOUND [10 1000]	; a low tone

SOUND [10 1000 100 1000]	; a low tone followed by a high tone

(SOUND 10 1000 100 1000 1000 1000)	; a low tone, followed by a higher tone, followed by an even higher tone


GRAPHICSCREEN	; enlarges the graphic screen

WAIT 200	; waits a moment

SPLITSCREEN	; turns the screen back to normal


PENUP

SHOWTURTLE	; shows the turtle

REPEAT 24 [FORWARD  45  STAMP  RIGHT  165]	; the turtle turns and stamps

RIGHT  90  FORWARD  110	; the turtle walks away


SHOW SUM 20 30	; 50, in the text screen

SHOW (SUM 10 10 10 10)	; 40, in the text screen


FORWARD SUM 10 10	; the turtle moves 20 steps forward


SHOW WHO	; 0, the only active turtle

MAKETURTLE "TRAIN [10 10 90]	; creates a turtle TRAIN

TELL [TRAIN]	; makes turtle TRAIN active

SHOWTURTLE	; shows the turtle TRAIN on the screen

SHOW WHO	; [TRAIN], the only active turtle

REPEAT  4  [FORWARD  60  RIGHT  90]	; turtle TRAIN draws a square


TEXTSCREEN	; enlarges the text screen

SPLITSCREEN	; turns the screen back to normal


TO SQUARE	; makes the procedure square

REPEAT  4 [ FORWARD  100 RIGHT 90]	; commands for square

END	; end of procedure square


SHOW  (6  =  2  +  3)	; FALSE

SHOW 9 > 3	; TRUE


SETTEXT "ARIAL [18 400 1]	; font Arial, 30 points, not bold, italic

TTEXT [FROM LEFT TO RIGHT] 	; text is written horizontally

LEFT 90 	; the turtle turns 90 degrees to the left

TTEXT [FROM BOTTOM TO TOP]	; the text is written vertically


TYPE  "HELLO	; Hello?, the prompt is now behind the last character


TYPE [A  B  [1  2]  C  D]	; A  B  [1  2]  C  D?


WAIT 1000	; the program waits one second

REPEAT 100 [FORWARD 10 WAIT 1000]	; the turtle moves forward and waits

WAIT 100	; the program waits about a tenth of a second


MAKETURTLE "TRAIN	; creates a turtle named TRAIN

MAKETURTLE "CAR	; creates a turtle named CAR

TELL "CAR	; makes the turtle CAR active

SHOW WHO	; CAR, the car is active

TELL [TRAIN CAR]	; Makes the turtles TRAIN and CAR active

SHOW WHO	; [TRAIN CAR], all active


SHOW WORD "Super "Logo	; SuperLogo

SHOW (WORD "Su "per "Logo)	; SuperLogo, the operation is between brackets


SHOW WORD? "aeroplane	; TRUE

SHOW WORD? 3	; TRUE

SHOW WORD? "3	; TRUE

SHOW WORD? [ANDREA IVAN PETER]	; FALSE, one list is not a word


TO  SilentNight

   PLAY  [I19 R  T70  L8  O2]

   REPEAT  2  [PLAY [f.  16g  f  4d.] ]

   PLAY  [L4  O#  c  8c  Ob  a.]

   PLAY  [hb  8hb  f.]

   REPEAT 2 [PLAY  [O2 G 8G 8A#. 16A 8G 8F. 16G 8F D.]]

   PLAY [O3 C 8C 8D#. 16C O2 8A A#. O3 D.]

   PLAY [O2 8A#. 16F 8D 8F. 16EB 8C T65 O1 A#. A#.]

END

? SilentNight


PLAY [R O2 c d e f g a b O3 c]	; Plays do re mi fa sol


SHOW  ASCII  "A	; 65

SHOW  ASCII  "1	; 49

SHOW  ASCII  "!	; 33


SHOW  CHAR 65	; A, the ASCII-code of the capital A

SHOW  CHAR 33	; !, the ASCII-code of the exclamation mark


TO demo.codearea

   CLEARSCREEN

   PENDOWN

   REPEAT 4 [FORWARD 50 RIGHT 90]	; draws a rectangle

   PPROP "CODEAREA 1000 [0 50 50 0]

   MAKE "printsome READKEY

   SHOW :printsome

   demo.codearea

END


PPROP  "CODEAREA  1001  [-210  70  -180  50]

PPROP  "CODEAREA  1002  [-210  40  -180  20]


DRAW	;

SHOW HEADING	; 0, the direction is 0 degrees

RIGHT 45	; the turtle turns 45 degrees to the right

SHOW HEADING	; 45


MAKE  "something  99	; creates a variable named 'something'

INC  "something	; increases by 1

SHOW  :something	; 100, that is 99 plus 1

(INC "something 3)	; increases by 3

SHOW :something	; 103, that is 100 plus 3


CLEARSCREEN	; turtle back to position [ 0 0 ]

FORWARD 100	;

SHOW POS	; [0  100]

RIGHT 90	;

FORWARD 100	;

SHOW POS	; [100 100]


CLEAN	; turtle in start position [ 0 0]

FORWARD 40	;

SHOW YCOR	; 40


SHOW POS	; [40 0], the co-ordinates of turtle 0

SHOW LAST POS	; 40, the Y-co-ordinate of turtle 0

SHOW YCOR	; 40, the Y-co-ordinate of turtle 0


CLEAN	; the turtle is at POS [0 0]

RIGHT 90	; the turtle turns 90 degrees to the right

FORWARD 40	; the turtle goes 40 steps forward

SHOW XCOR	; 40, the turtle is at POS [40 0]


SHOW POS	; [0 0], the co-ordinates of turtle 0

SHOW FIRST POS	; 0, the X-co-ordinate of turtle 0

SHOW XPOS	; 0, the X-co-ordinate of turtle 0


MAKE  "your.name READWORD	; Makes the variable your name

Peter	; type the word Peter

PRINT :your name	; Peter is printed in the text screen


MAKE "just typed READLIST	; Makes the variable just typed

this is fun	; type: this is fun

PRINT :just typed	; [this is fun] is printed


TO Wait a moment

   IF  KEY?  [typed] 	;if a key is pressed start procedure typed.

   PRINT [I'm waiting...]	;

   Wait a moment	;if no key has been pressed start Wait a moment again

END

TO typed

   PRINT [Typed is:]

   PRINT READCHAR	;print the letter that has just been pressed

   WAIT 1000	;wait before the program continues

END


MAKE "key READCHAR 	;Makes a variable KEY

;type a

SHOW :key	; a is printed


MAKE "Key READKEY 	;Makes a variable KEY

;type a

SHOW :Key	; 97 (the ASCII-code of a) is printed


REPEAT 20 [SHOW  REPCOUNT WAIT 100]


RUN  [PRINT "one  FORWARD 100]	;one printed in text screen

;afterwards the turtle moves 100 steps forward


MAKE  "something  [REPEAT  40  [FORWARD  80  LEFT  117] ]	; a list of commands

RUN  :something	; execute the commands


PRINT [Click on the turtle]	;

SHOW READKEY	; wait until the mouse button is pressed

MAKE "Which.turtle TURTLEKLIK	; Makes a variable Which.turtle

SHOW :Which.turtle	;  0, the name of the standard-turtle 0


CLEARSCREEN	; the turtle points to the top

SETHEADING TOWARDS [-50 50]	; the turtle points to the left


CLEARSCREEN

MAKETURTLE "Jim [60 40 0]	; Makes a turtle at  POS [60 40]

ASK "Jim [SHOWTURTLE]	; show Jim

FORWARD 40	; turtle 0 goes forward (turtle 0 is active)

SETHEADING TOWARDS ASK "Jim [POS]	; turns the turtle towards Jim


MAKE  "who  [YOU  and  ME]	; one variable named who containing a list [ ]

PRINTLINE  :who	; YOU  and  ME


MAKE "hundred 100	; new variable named hundred with the value 100

SHOW :hundred	;100


; click with the mouse in the graphic screen

SHOW READKEY	; wait until a mouse button is pressed

SHOW MOUSE	; show the position on the screen where you have clicked


SHOW DATE	;


SHOW TIME	;


CLEARSCREEN	; set the turtle to POS 0 0

SHOW INSIDE? [-10 10 20 30]	; check if the turtle is inside the rectangle

; TRUE in the text screen


TO in.rectangle	;moves the turtle a little further

FORWARD 10	;you will hear a beep when the turtle moves inside the rectangle

IF INSIDE? [-10 10 20 30] [SOUND [100 1000]]	;I

in.rectangle	;restart the procedure

END


CLEARSCREEN	; set the turtle to POS 0 0

FORWARD 40	; move the turtle 30 steps forward

SHOW OUTSIDE? [-10 10 20 30]	; check if the turtle is outside the rectangle

; TRUE in the text screen


TO out.rectangle	;

FORWARD 10	; moves the turtle a little forward

IF OUTSIDE? [-10 10 20 30] [out.rectangle]	;starts the procedure out.rectangle when outside the rectangle

SOUND [100 1000]	;if not sound a beep

out.rectangle	;restart procedure

END


SHOW CHOOSER  "SETPENCOLOUR	; shows the chooser belonging to SETPENCOLOUR


MAKE "turn CHOOSER "RIGHT	; shows the chooser right

RUN :turn	; executes the command in:turn


WAITUNTIL [KEY?]	; wait until a key or mouse button is pressed

WAITUNTIL [READKEY = -2]	; wait until a mouse button is pressed


SHOW READLISTDIALOG	; type: fun and press Enter


MAKE "text READLISTDIALOG	; makes a variable "text

; type: fun and click on OK

SHOW :TEXT	; [fun] is printed


SHOW READLISTTURTLE	; type: fun and press Enter


MAKE "text READLISTTURTLE	; makes a variable "text

; type: fun and press Enter

SHOW :TEXT	; [fun] is printed


SHOWTURTLE	; shows the turtle 0

MAKETURTLE "two [SHOWTURTLE]	; Makes a new turtle named two

SHOW OVERLAP? "two	; checks if the first turtle is in front of the second one

WAIT 5000	; TRUE in the text screen

ASK "TWO [FORWARD 50]	; moves turtle two forward

SHOW OVERLAP? "two	; checks if the first turtle is in front of the second one.

; FALSE


SHOWTURTLE	; shows turtle 0

MAKETURTLE "two [SHOWTURTLE]	; makes a new turtle named: two

MAKETURTLE "three [SHOWTURTLE]	; makes a new turtle named: three

SHOW OVERLAPPED 	; checks which turtles are in front of the first turtle

WAIT 5000	; [two three] in the text screen

ASK "two [FORWARD 50]	; moves turtle two forward

SHOW OVERLAPPED 	; checks which turtles are in front of the first turtle

WAIT 5000	; [three] in the text screen

ASK "three [FORWARD 150]	; moves turtle three forward

SHOW OVERLAPPED 	; checks which turtles are in front of the first turtle

; [ ] in the text screen


SETPENCOLOUR 0	; the pencolour is now black

SETSHAPECOLOUR 2	; dark green (COLOUR 2)

WAIT 1000	;

SETPENCOLOUR 14	; the pencolour is now yellow

; dark green has become yellow inside the turtle


The order of Computations for numbers
The order of Calculation for numbers

Calculations are always executed in this order:

-	from left to right;

-	multiplication before division;

-	division before addition;

-	addition before subtraction.


Wees voorzichtig met de volgorde van berekeningen
Be careful with the order of calculations

SHOW  (BUTLAST  123)  +  (BUTFIRST  543)	; 55

SHOW  BUTLAST  123  +  BUTFIRST  543	; 16

In the operation of (BUTLAST  123)  +  (BUTFIRST  543) SuperLogo first calculates BUTLAST of 123 - makes 12 - and then BUTFIRST of 543 - which makes 43.
After that the results will be added up.

When you do not use brackets, 123 will be added up first with BUTFIRST  543. That makes 43. After that BUTLAST will be operated, which gives the result 16. In general + is operated before other operations like BUTFIRST or BUTLAST. When you want to change this order, you have to use the brackets.


Het escape-teken en verboden tekens
The escape-character and forbidden characters

This is a difficult command and isn't

explained in the Help for Kids


Basic Definitions - Abbreviation...
Abbreviations...

Many procedures have alternative short names - abbreviations. These are especially for frequently used procedures with long names. Abbreviations save space and make instructions more readable.

For example, we can type:

FD	instead of	FORWARD

LT	instead of 	LEFT

BG	instead of	BACKGROUND etc.


Kenmerken
Properties

is a pair consisting of a name and a value. Any number of properties with different names can be associated with a word..

For the word ELEPHANT we can define following properties:

with name	and value

-----------------------------------------

 WEIGHT	3200	by   PPROP "ELEPHANT "WEIGHT 3200

 AGE	1.MONTH	by   PPROP  "ELEPHANT "AGE "1.MONTH

 NAME	JUMBO	by   PPROP  "ELEPHANT "NAME "JUMBO

All defined properties associated with a word form the property list of the word.

To find it, use the PLIST operation.  To get the property list for ELEPHANT:

? SH PLIST "ELEPHANT

[WEIGHT 3200 AGE 1.MONTH NAME JUMBO]


Input for a command or operation

An input could be anything in SuperLogo. Examples are:

numbers: 55, -55, 0, 67.7777434,

images:

words: JOHN, TRUE, Welcome to.SuperLogo

lists: [How  are  you], [ ], [A  B  [C  D [E]  F]

Important! 	For the expression PRINT  DIFFERENCE  222  11, the input for PRINT is the number 211. First the calculation is made, the result is the input for PRINT.

SUM  66  21 	; 87

AMOUNT "JAN	;3

Every number, word, list or output of an operation can be used as input for another operation or command.


Wanneer gebruik je TEST, ALSNIETWAAR en ALSWAAR
When do you use TEST, IFFALSE or IFTRUE

This is a difficult command and isn't

explained in the Help for Kids


Active procedures

Active procedures are user defined Logo procedures which have not yet finished their work.


User Defined Objects

This is a difficult command and isn't

explained in the Help for Kids


Hoe gebruik je verschillende varianten van een afbeelding
How to Use Frames of an Image

Any image can be used by a turtle as its shape, see the SETSHAPE command.. There are two different methods used to display the turtle using its shape's frames:

To change the method, use SETFRAMEMODE command.

To change current frame in the SETFRAMEMODE "FALSE mode, use RIGHT, LEFT or SETHEADING commands. To change current frame in the SETFRAMEMODE "TRUE mode, use SETFRAME command.

To find the currently depicted frame in both modes, use FRAME operation.


Filenames

is a word specifying a file. SuperLogo - and Windows in general - uses MS-DOS naming conventions.


Extensions

The following extensions are used by SuperLogo for filenames:

.BMP for bitmaps (e.g. Paintbrush drawings)

.LGP for SuperLogo-projects,

.LGW for files with images,

.TXT for problems files,

.WAV for audio files


Procedures verbergen
Hiding procedures

This is a difficult command and isn't

explained in the Help for Kids


How to make your own Demo Project

A demo project is any Logo project saved as LGP file in the DEMO subdirectory. It must contain a procedure named STARTUP. If the demo project also contains an image variable ICON, its value is used as the project's icon in the Demo Projects Window. Otherwise, the default SuperLogo icon is used instead.


Syntax

This shows the syntax of the command.

See also:

Syntax of input

Typing SuperLogo instructions on the Command Line


Knop in de knoppenbalk
Button in the Buttonbar

This is a button in the buttonbar.


SuperLogo Help voor Kinderen
SuperLogo Help for Kids

SuperLogo Help for Kids is written by Addo Stuur and Stefan Jager.

SuperLogo is a part of the package Programming for Kids with SuperLogo©

published by A.W. Bruna Informatica.

ISBN 90 229 3843 3

© 1994 Addo Stuur

A.W. Bruna Uitgevers B.V.


Clipboard

The clipboard is a temporary space in the computer memory for saving text or images you have cut or copied. You can use the clipboard to move text within the Object Editor, or from one procedure to another.

You can cut or copy text from one place and paste it somewhere else, you can paste the contents of the clipboard to the command line in the Text screen (and then run it), you can copy small images from other Windows applications to MegaPaint etc..

Text and images are always put on the clipboard with the Cut and Copy commands. The information on the clipboard is stored until new text or a new image is copied to the clipboard. The contents of the clipboard is always inserted at the new location with the Paste command.


Basic Definitions - Prompt...
Prompt...

is any word (empty or non empty) not longer than 16 characters which appears in the text screen whenever Logo expects us to type an instruction/instructions into the command line. The default text prompt is a question mark followed by a space.


Basic Definitions - Command Line...
Command Line ...

is an editing line of the text screen. It begins with the actual text prompt or the special character (>) showing that we are defining a procedure, see procedure TO. In the command line we type Logo instructions or any data expected and processed by a running program.

The contents of the command line may actually be longer than 80 characters. In this case it is automatically wrapped into the following line. If you want to finish  the command line and let Logo evaluate its contents, press Enter.

If you press Esc instead of Enter, the command line is cleared and nothing happens.

Command Line Editing Keys


Basic Definitions - Image...
Image...

is one of the data types which in Logo may become a value of a variable. It is an empty or non empty series of frames, i.e. bit maps which may be stored in LGW files and used in your projects. An image can be attached to any turtle as its actual shape. Following image is normally used as the basic (default) turtle shape:

You can make turtles of any shape you want to use in your programs:

Some more notes:

By SETFRAMEMODE command we can change the way in which frames in a turtle's file are used.

Images can be used as parts of our drawings using the PUTIMAGE command (and others).

We can work with images in similar way to words and lists.

The maximum number of frames in an image is 250.

The maximum size of a frame is 255 x 255 points.


Basic Definitions - Project...
Project ...

is the most important idea in SuperLogo. You use Logo either to run or to develop a project; to "solve a problem" by creating our own turtles, by defining their behaviour in procedures and variables, by creating or importing the contents of the graphics screen etc.

A project (saved in an .LGP file) is a complex structure containing all the information about:

all turtles (that is, all facts about each existing turtle),

all user-defined objects (if you check this option while saving the project),

the complete state of the Main Window, that is, how the screen is divided between text and graphics screens, the actual contents of the graphics screen (if you check this option while saving the project), size of the graphics screen, its background colour, text colours, whether the Speed Bar is shown, whether the Buttons Window is shown or not and the texts defined for its buttons, whether the project has been saved with the Native Language Version on or off,

if there is an image variable named ICON (of exactly 32 x 32 size) defined at the time of saving the project, its value is converted into an icon which is used as the project's icon in the Demo Projects Window.


Active Turtle

is any turtle which is actually a member of the WHO list. To make a turtle active, use TELL command.

When a turtle is created or recreated by MAKETURTLE command, it immediately becomes the youngest turtle, that is the last turtle of the ALLTURTLES list. The order of turtles in ALLTURTLES list can be changed using the REORDER command and is important when some turtles' shapes are overlapping on the screen - the younger the turtle is, the fewer turtles can cover it. The youngest turtle is always on the top of all others.

The active turtle is said to be the first active turtle, if it is the first member of ALLTURTLES list. That is, if it is the oldest turtle.


See also...

Control menu for the Step by Step Window

Buttons of Step by Step Window


How to Debug Your Work

When a DEBUG command is entered from the command line of the text screen, the debugging mode starts. In this mode, the Step by Step Window appears on the screen. Debugging can help you develop your program or provide help finding and checking errors (called bugs) in your program. The commands to be debugged are entered as the input for the DEBUG command. This must be a list of one or more valid Logo instructions:

? DEBUG [MOVE.ME 200 TURN.ME 75]

Obviously, there is no need to debug Logo instructions like:

? DEBUG [FD 200 RT 90]

Debugging in SuperLogo is line oriented, that is the smallest unit to be examined in one step is always the contents of the whole line.

  Step by Step Window


Step by Step Window Control Menu

This menu contains commands that allow you to set options for debugging. A check mark appears next to some options when selected. A check mark disappears when you select the option again.


Step by Step Window Buttons

This window contains seven control buttons which let you debug or trace your work in several ways. To find out more about any button, click it with the mouse.


Step by Step Window
Step by Step Window ...

This window provides a complex debugging, developing, and tracing tool.

  Step by Step Window

  Its Control Menu

  Its Buttons

The Step by Step Window can be used while any instructions input to the DEBUG command from the command line are running. Its actions are available through seven buttons which control the way the instructions flow. It can be used in:

the text screen only to trace the instructions through text messages. The level of detail of these messages can be set from the Step by Step Window Control Menu,

the graphics screen only to see the instructions' basic steps,

within the Memory Window to look at the definitions of your procedures, the values of variables or the words with defined properties. Some of these objects can even be changed while the instructions are running,

in any combination of the Memory Window and either text screen or graphics screen, or both.


Close          Alt+F4

Use this command to stop the debugging process and close the Step by Step Window.


Write Steps

If this option is selected, a full text message starting with

STEP:

is printed into the text screen followed by the contents of current line of your procedure. This is done for each line.

This option is always selected (on), when you start Logo.


Write Procedure Entry and End

If this option is selected, a message

PROC ENTRY: name_of_the_procedure entered

is printed into the text screen whenever the instructions go into a user defined procedure. A similar message

PROC END: name_of_the_procedure closed

is printed whenever a user-defined procedure is finished.

This option is always selected (on), when we start Logo.


Enter Closed Procedure

If this option is not selected (off), any user-defined sub-procedure, which is not open in the Memory Window, is treated as a single statement. (Sub-procedure means any user-defined procedure which is called from the procedure being debugged). Otherwise, whenever a closed procedure is called, Logo opens it in the Inspection Area of the Memory Window and traces through it line by line.

This option is always selected (on), when you start Logo.


Eliminate Tail Recursion

is not on when we start Logo, which means that tail recursive calls are displayed as truly recursive (with increasing indentation). If we check this option, tail recursion is shown like REPEAT.


Step by Step Window Control Menu

To learn more about the Step by Step Window Control Menu, see:

  Control Menu


One Step Button...

carries out the next line of the instructions being traced. If the Memory Window is open, the line is highlighted. This is the most important button in the Step by Step Window, because it allows you to execute the instructions one line at a time. If the Write Steps option of the window's Control Menu is checked, the contents of the line is printed into the text screen. If the Enter Closed Procedures option of the window's Control Menu is checked and next line of instructions contains a call to another user-defined procedure (a sub-procedure), Logo enters the sub-procedure and steps through it line by line (even if the Memory Window is hidden). If the option is not checked and the sub-procedure is closed in the Memory, a line which calls a sub-procedure is treated as a single step. (This is true both when the Memory is hidden or shown.)


Step Over Button...

like the One Step button, this executes one line of instructions. The difference is that any call to a sub-procedure in the line is treated as a single step. However, if the PAUSE command is used during "stepping over", the step is not finished - it stops in the line following the line with the PAUSE command, even if it is in a sub-procedure or in a sub-sub-procedure etc. The same is true, if you click the Pause button while "stepping over" is in. In this case the instructions stop at the line following the line having been executed when the Pause button was pressed. Paused instructions can be continued with any button in the window (except Pause and Stop).


Finish Active Procedure Button...

executes in one step the rest of the active procedure and so either finishes the whole computation, or finishes the sub-procedure being executed and returns to its calling procedure in the chain of active procedures. However, if a PAUSE command is found, the active procedure is not finished - Logo stops in the line following the line with a PAUSE command, even if it is in a sub-procedure or in a sub-sub-procedure etc. The same is true if you click the Pause button while "finishing active procedure" is on. In this case the instructions stop at the line following the line when the Pause button was pressed. Paused instructions can be continued with any button in the window (except Pause and Stop).


Finish All Button...

executes in one step the rest of the instructions being stepped through. However, if PAUSE  is encountered during "finishing all", the instructions are not finished - it stops in the line following the line with PAUSE command, even if it is in a sub-procedure or in a sub-sub-procedure etc. The same is true if you click the Pause button while "finishing all" is on. In this case the instructions stop at the line following the line when the Pause button was clicked. Paused instructions can be continued with any button in the window (except Pause and Stop).


Watch Button...

runs all the instructions, highlighting each line being executed without pausing. This button lets you watch of the flow of the instructions. The same rules apply to the PAUSE command and Pause button as with the One Step, Step Over, Finish Active Procedure and Finish All Buttons.


Pause Button...

interrupts the instructions (in the same way as the PAUSE command does). Paused instructions can be continued with any button in the window (except Pause and Stop).


Stop Button...

stops the instructions completely so that they can't be continued. Clicking this button during the running of the instructions (for example, when Finish All or Step Over is used), has the same effect as clicking Stop button on the Speed Bar, or pressing the F12 function key.


More examples for ALLTURTLES and WHO
More examples of ALLTURTLES and WHO - Try it!

Make sure that only turtle 0 exists. Like this:

SHOW ALLTURTLES	; [ 0 ]

SHOW WHO	; 0

  ASK  SQUARE  :SIDE

    REPEAT 4 [FORWARD :SIDE RIGHT 90]

  END

MAKETURTLE  "IAN  [ 100 40 90 ]

MAKETURTLE  "JACKY  [ -100 40 270 ]

SHOW  ALLTURTLES	; [ 0  IAN  JACKY ]

FORWARD  100 	; FORWARD only moves turtle 0,

USE  ALLTURTLES 	; From now on all three turtles are active.

SHOW  WHO	;[ 0  IAN  JACKY ]

EACH  [ PRINT  POS ]	; 0  100

; 100  40

; -100  40

SHOWTURTLE

SQUARE 60

HIDETURTLE

ASK  BUTFIRST  ALLTURTLES  [RIGHT  20  SQUARE  40]

Did you try it? And now some more:

ERASEALL

MAKETURTLE 1 [ ]

MAKETURTLE 2 [ ]

MAKETURTLE 3 [ ]

USE [ 0 1 2 3 ]

SHOW  WHO	; [ 0  1  2  3 ]

SHOWTURTLE

EACH [ SETHEADING 45+90*WHO FORWARD 25+30*WHO ]

EACH [ PRINT WHO ]	; 0

; 1

; 2

; 3

SHOW WHO	; [ 0 1 2 3 ]


More examples for ASK, USE and MAKETURTLE
More examples of ASK, USE and MAKETURTLE - Try it!

ERASEALL

SHOW ALLTURTLES	; [ 0 ]

MAKETURTLE  "BILLY  [ 10 10 90 ]	;

MAKETURTLE  "JAKE  [ 10 10 180 ]	;

MAKETURTLE  "AMANDA  [ 10 10 270 ]	;

USE [ JAKE  AMANDA ]

SHOW  WHO	; [ JAKE  AMANDA ]

REPEAT 4 [ FORWARD 60 RIGHT 90 ]

FORWARD 60

SHOWTURTLE

USE  [ BILLY  JAKE  AMANDA ]

PENUP FORWARD 10 PENDOWN

REPEAT 4 [ FORWARD 60  RIGHT 90 ]

SHOWTURTLE

USE "JAKE	; JAKE is active

ASK  "BILLY [ PENUP  FORWARD  70  PENDOWN ]

ASK  "BILLY [ REPEAT 4 [ FORWARD 60 RIGHT  90 ] ]

ASK  "LOUIS [ FORWARD 100 ]	; For ASK the turtle LOUIS does not exist

ASK [ BILLY AMANDA ] [ SHOW WHO] 	; [ BILLY  AMANDA ]

SHOW WHO	; JAKE, still active

ASK "BILLY [ PENUP ]

SETPEN  ASK "BILLY  [ PEN ]	; to change JAKE's  pen

PRINT PEN	; what is JAKE's pen now?

PENUP	; it is PENUP


More examples of working with numbers
More examples of working with numbers - Try it!

MAKE  "A  5

PRINT  ( 2*2.42  <  "A )	; WRONG:  <  wants A as input

PRINT  ( 2*2.42  <  :A )	; TRUE

SHOW  ( [ ]  =  "  )	; FALSE


More examples of EQUAL?
More examples of EQUAL? - Try it!

Because numbers in SuperLogo are sometimes words, this happens:

SHOW  EQUAL? 7*12  WORD  8  LAST  [ 2  4 ]	; TRUE

SHOW  EQUAL?  27  "27	; TRUE


Examples of EMPTY?
More examples of the command  EMPTY? - Try it!

TO  PRINT.ELEMENTS  :INPUT	; both for words and lists

   IF  EMPTY?  :INPUT  [ STOP ]

   PRINT  FIRST  :INPUT

   PRINT.ELEMENTS  BUTFIRST  :INPUT

END

PRINT.ELEMENTS  "HELLO	; H

; E

; L

; L

; O

PRINT.ELEMENTS  [ HAVING A  COMPUTER  IS  FUN ]	; HAVING

; A

; COMPUTER

; IS

; FUN


Examples of CATCH and THROW
More examples of CATCH and THROW - Try it!

REPEAT  3  [ CATCH  "HERE  [ PRINT  "A  THROW  "HERE  PRINT  "B ] ]

;A, B will not be printed!

TO  BABY.LOGO

    CATCH  "WRONG  [ RUN  READLIST ]

    IF  ( NOT  EMPTY?  WRONG )  [ PRINT  [ OOPS! TRY AGAIN! ] ]

    BABY.LOGO

END

BABY.LOGO

SHOW  22  +  7	; this input is correct

; 29

GIVE  22  +  6	; GIVE is an unknown command

;OOPS!  TRY AGAIN!

:	; The procedure BABY.LOGO waits for

; the next input

TO  GUESS.A.NUMBER  :A

   PRINT [ GUESS  A  NUMBER! ]

   GUESS

   PRINT  [ THAT IS CORRECT! ]

END

TO  GUESS

   LOCAL "Attempt

   MAKE  :Attempt  READWORD

   IF  MEMBER?  ".  :Attempt  [ PRINT  [ THIS IS NOT FAIR! ]  THROW  "OUT ]

   TEST  :Attempt  =  :A

   IFFALSE [ PRINT  [ WRONG!  TRY AGAIN! ] ]

   GUESS

END

GUESS.A.NUMBER  6

GUESS  GUESS  A  NUMBER!

: 2.5

THIS IS NOT FAIR!


Examples of PENERASE
Another example of PENERASE - Try it!

TO ROUGH DRAFT

    RIGHT  1

    REPEAT  40 [ FORWARD  110  RIGHT  178  FORWARD  220  LEFT  178  FORWARD  110 ]

END

ROUGH DRAFT

SETPENWIDTH  8

PENERASE

LEFT  69

REPEAT  4  [ FORWARD  140  LEFT  99 ]


More examples of PATTERN and SETPATTERN
More examples of PATTERN and SETPATTERN - Try it!

MAKETURTLE  "ANNE  [ 20  20  180 ]

ASK  "ANNE  [ SHOW  PATTERN ]	; 0

ASK  "ANNE  [ SETPATTERN  PATTERN+2 ]

ASK  "ANNE  [ SHOW  PATTERN ]	; 2
; that is the same as SHOW ASK  "ANNE  [ PATTERN ]

TO  POLY.SPI  :STEP  :CORNER

    IF  :STEP <  0.5  [ STOP ]

    FORWARD  :STEP  LEFT  :CORNER

    POLY.SPI  :STEP-3  :CORNER

END

DRAW

MAKETURTLE  0  [ -120  -60  0 ]

MAKETURTLE 1  [ -60  30  0 ]

MAKETURTLE 2  [ 0  -80  0 ]

MAKETURTLE 3  [ 60  30  0 ]

MAKETURTLE 4  [ 120  -60  0 ]

USE  [ 0  1  2  3  4 ]

PENDOWN

HIDETURTLE

EACH  [ SETPATTERN  WHO ]

POLY.SPI  150  156


Examples of PENWIDTH and SETPENWIDTH
More examples of PENWIDTH and SETPENWIDTH - Try it!

MAKE  "I  1

REPEAT  4  [ MAKETURTLE  :I  [ ]  INC  "I ]

SHOW  ALLTURTLES	; [ 0 1 2 3 4 ]

USE  ALLTURTLES

EACH  [ SETPENWIDTH  1 + 2*WHO  SETX  10*WHO ]

EACH  [ PRINT  PENWIDTH ]	; 1

; 3

; 5

; 7

; 9

TO  POLY.SPI  :STEP  :CORNER

    IF  :STEP <  0.5  [ STOP ]

    FORWARD  :STEP  LEFT  :CORNER

    POLY.SPI  :STEP-7  :CORNER

END

PENDOWN

FORWARD  50

POLY.SPI  90  163