LOGO Language Instructions

by R. Barrett and B. DeRoos

THREE (3) SPECIAL WORK AREAS IN LOGO:
1. The TURTLE SCREEN or Play Pen (Graphics Area) where the turtle draws with a pen taped to his middle. PRINTSCREEN gives a hard copy of this graphics area.
2. The COMMAND CENTER under the Play Pen. Use [Ctrl]U to go to the Play Pen and or [Ctrl]D to return to Command Center. You issue commands in the Command Center like FD 50 to go forward 50 steps or NPE "______ to save the playpen and the flip page.
3. The PROCEDURE SCREEN of "Flip Side" i.e. the Turtle's memory. To go to Flip Side press [Ctrl] F and use the same keys to return to the play pen page. You put or write procedures here like TO BOX below. Then you can use the procedure in the Command Center by typing BOX. Use PRINTTEXT from the Command Center under the PROCEDURE SCREEN to print out procedures. When you turn off the computer or get out of LOGO, you lose all the commands in the Command Center. Only procedures and the pictures in the Play Pen are saved when the page is save. So I call the procedure page the Turtle's Mind because you can teach turtle things to do here and he will remember.

TWO (2) SPECIAL SCREENS IN LOGO:
1. The TITLE SCREEN which you see when you first get into LOGO.
2. The LOGO selection screen or SCRAPBOOK which allows you to recall previous work or to design new pictures/text on a NEW PAGE. The Scrapbook organizes by Page Name all your turtle drawings, & the recipes or procedures. LOGO saves the Play Pen and the Procedures with the NP "filename command. The [Esc] key takes you from a work page back to the Scrapbook.

TWO (2) TURTLE SPEEDS:
1. Star War's Warp or light speed where the turtle goes too fast to follow. This is the default speed or Fast Speed. To get back to this speed the command is FASTTURTLE
2. Slow speed where the turtle crawls around the screen. This speed is great when you are "playing turtle". "Play Turtle" is a problem solving technique that Seymore Papert suggests for solving problems. "Just think how the turtle would have to move to draw what you want!", Papert would say. SLOWTURTLE is the command for this speed.

SPECIAL KEYS:
[Esc] Escape to get back to the Scrapbook screen.
[Ctrl][Pause] STOP a turtle trip or a calculation.
[Ctrl]F FLIP to the FLIP or PROCEDURE screen.
[Ctrl]U To put cursor into the Play Pen for labeling or adding text
[Ctrl]D To go DOWN to COMMAND TABLET from Play Pen
[Ins] To get a fresh line on the Command Center

SYSTEM COMMANDS:
NP "___ Name Page for saving. (Use an 8 letter name.) You must do this before you can get out of LOGO.
DOS Return to DOS; get out of LOGO
PRINTSCREEN Prints what is visible on the turtle Play Pen
PRINTTEXT Prints TEXT only. To print out PROCEDURES, flip to the procedure Page, use [Ctrl]D to get to the Command Center. Type PRINTTEXT.
NEWPAGE If you have already named the current page, this command save the currently page and starts you on a new page.
ERPAGE "___ ERase PAGE erases the page named from the scrapbook saved on disk.

COMMANDS:
RG Reset or Clear Graphics
CC Clear Command Center
CG Clear Graphics
CT Clears TEXT in the TURTLE TABLET
RT __ Right Turn (Degrees)
LT __ Left Turn (Degrees)
FD __ Forward (Turtle Steps)
BK __ Back Up (Turtle Steps)
REPEAT __ [ commands ] (Number of Repeats) Command to Repeat Commands
PE Pen Erase removes a line that turtle covers.
PU Pen Up turtle does not make a line
PD Pen Down turtle draws and the STAMP command works
HT Hide Turtle
ST Show Turtle (opposite of Hide Turtle)
PRINT [_______] Puts TEXT on the Play Pen with CARRIAGE RETURN
RANDOM nn Selects an Unexpected NUMBER from 0 TO nn
SETBG __ Choose a Color 1 to 8:

NUMBER1234 5678
COLORBLUEPURPLEWHITE REDPURPLETANBLACK GREY

SETC nn Set or Change Turtle's COLOR and color of lines; use a number 1 to 15
SETSH nn Set SHAPE. Choose from 35 or more shapes see TABLE below.
SHAPES Shows SHAPES and their NUMBERS; to return to Command Center. When you type this command you can create or edit sprites or shapes. They will be automatically saved in the shapes file.
STAMP Prints SHAPE of TURTLE on SCREEN & LEAVES it there!
TONE fff dd Sounds a NOTE of FREQUENCY fff and DURATION dd (See table).

MATH COMMANDS:
A variable when defined has a (Quotation Mark) in Front "X but when used it has (Colon) in Front :X Variables DO NOT have default VALUES. They must be defined before use!
MAKE "C 10 Assigns or defines C as 10.
MAKE "X :X + 1 Is Counting
IF___ [____] IF comparison [ commands ] e.g. IF :X > 10 [STOP]

SHAPE TABLE:


MUSIC NOTES:

NOTECC#DD# EFF#GG#A A#B
FREQUENCY 523554587622659 698740784830880 932988

A rest is TONE 0 5

PROCEDURES:
Must be typed on the FLIP page using F,
they must start with an infinitive like TO BOX (no spaces in procedure name), and they must end with an END on a separate line. Examples below:

TO STAR Draw a STAR
REPEAT 12 [FD 100 RT 160]
END

TO C Play the note C with a duration of 10
TONE 523 10 To actually sound this note type C at the command line
END
TO CIRCLE Draw a CIRCLE
REPEAT 36 [FD 5 RT 10] The RT angle and the number of repeats must be 360 for a full circle
END

TO FLOWER
REPEAT 10 [RT 36 CIRCLE] 36x10 = 360 for a full flower
END

TO BOX Draw a BOX
REPEAT 4 [FD 50 RT 90]
END


To Return to Bob Barrett's Homepage