FROM THE METRO-ORLANDO AUG (MOAUG)
NEWSLETTER.
A SERIES of articles on LOGO by RICKI
GERLACH.
 
We hope to distribute future parts of
this series.




Ricki Gerlach's 2nd LOGO column from
July MOAUG:

Features that contribute to LOGO's
simplicity are summarized as:
 
1. LOGO IS INTERPRETED AND
INTERACTIVE.  This means that LOGO
will try to carry out your commands
right away, one line at a time.  An
interpreted language makes it
extremely easy to explore new
programming ideas.  An interactive
language is the major characteristic
that makes BASIC easy to use. A
noninteractive language like FORTRAN
or PASCAL must be 'compiled'.

2. LOGO IS MODULAR.  Most modern
languages today (except BASIC) share
this property.  This characteristic of
LOGO allows programming projects to be
broken up into several smaller,
simpler parts.  Each part, or
'program', is called a 'PROCEDURE'.

3. LOGO IS EXTENSIBLE.  LOGO has
certain built-in key words like PRINT
and FORWARD.  These key words are
called 'PRIMITIVES', words that the
computer already knows.  However, you
can create new procedures which are
used just like the primitives.  An
extensible language uses the same
'syntax' for both primitives and
programmed procedures.

4. LOGO USES NONTYPED VARIABLES.  Most
languages have several 'types' of
variables: numbers, strings, arrays,
integers, real, etc.  LOGO uses words
(which includes numbers) and lists of
words.  The same variable in LOGO can
be an integer in one part of the
program and a character later on.

5. LOGO USES AUTOMATIC DYNAMIC MEMORY
ALLOCATAION.  This means you don't
have to worry about or declare the
size of lists or words before (or
while) you use them.

6. LOGO HAS DYNAMIC SCOPING.  Roughly
speaking, this means that LOGO will
use local variables first, if defined.
Otherwise, it will look for global
definitions.

7. LOGO USES HELPFUL ERROR MESSAGES.
LOGO error messages explain what
caused the error and where the error
occurs.  Debugging programs becomes
easy to do.

8. LOGO HAS TURTLE GRAPHICS.  Turtle
graphics provide a marvelous way to
begin learning a new language.  The
visual feedback is highly motivating
and not only teaches the language's
vocabulary and structure, but also
builds a foundation for the ideas of
structured programming.

A list is enclosed by brackets [  ]
You can list instructions for ADAM to
follow, as we did in Part 1.  Another
short procedure is:

TO STAR
REPEAT 5 [ FD 75 RT 144]
END

When entering a procedure, you enter
the line:  TO (Name of Procedure) and
a second line will appear, with the
same words.  You must move the cursor
down to the second line, and hit
return, so that it will become part of
the procedure.  Remember to push
Smartkey VI after you type END.  Try
this one:

TO SNOWFLAKE
REPEAT 10 [ FD 50 BK 50 RT 36]
END

Several commands that we need to know
are: HOME, CLEARSCREEN or CS, PENUP or
PU, PENDOWN or PD,  CLEARTEXT or CT, &
CLEARGRAPHICS or CG.

HOME sends the current turtle to the
center of the screen with a heading of
0 (facing north, or the top of the
screen.)  CS clears the screen of text
and graphics, and sends the current
turtle home.  PU raises the turtle's
pen, so that it will not draw on the
screen.  PD puts the pen down, so that
it will draw a line as the turtle
moves across the screen.  CT removes
only text from the screen, leaving the
graphics intact.  CG removes graphics
only, leaving any text on the screen.

