APPLE LOGO DOCS ----------------- APPLE LOGO LANGUAGE COMMAND SUMMARY ----------------------------------- * AND p1 p2 - Outputs TRUE if all its inputs are TRUE * ASCII n - Outputs the ASCII code for n * BACK (BG) n - Moves the turtle n steps backwards * BACKGROUND (BG) - Outputs a number representing the background color * BURY pkg - Buries all procedures contained in pkg * BUTFIRST (BF) obj - Outputs all but the first element of obj * BUTLAST (BL) obj - Outputs all but the last element of obj * BUTTONP n - Outputs TRUE if button on paddle n is pressed * CATALOG - Displays names of all files on diskette * CATCH name list - Runs list; Returns when THROW name is run * CHAR n - Outputs character whose ASCII code is n * CLEAN - Erases graphics screen without affecting the turtle position * CLEARSCREEN (CS) - Clears graphics screen; moves turtle to [ 0,0 ]; sets heading to 0 * CLEARTEXT - Clears text screen * CO - Resumes a procedure after a pause * COPYDEF newname name - Copies definition of name onto newname * COS n - Outputs cosine of n degrees * COUNT list - Outputs the number of elements in list * CURSOR - Outputs position of cursor * DEFINE name list - Makes list the definition of name * DEFINEDP word - Outputs TRUE if word is the name of a procedure * DISK - Outputs information about disk and disk drive * DOT pos - Put a dot at pos * EDIT (Ed) (name(s)) - Starts LOGO Editor (containing named procedure(s)) * EDNS (package(list)) - Starts LOGO Editor (containing variables in (package(list)) * EMPTYP obj - Outputs TRUE if obj is empty list or empty word * EQUALP obj1 obj2 - Outputs TRUE if its inputs are equal * ERALL (package(list)) - Erases everything in (package(list)) * ERASE name(s) - Erases named procedures * ERASEFILE "name - Erases file "name.LOGO from disk * ERN name(s) - Erases all named variables * ERNS (package(list)) - Erases variables in (package(list)) * ERPS (package(list)) - Erases variables in (package(list)) * ERROR - Outputs list of information about most recent error * FENCE - Will not allow turtle movement beyond edge of screen * FIRST obj - Outputs first element of obj * FORWARD (FD) - Moves turtle n steps forward * FPUT obj list - Outputs list formed by putting obj on front of list * FULLSCREEN ([ctrl-L]) - Devotes entire screen to graphics * GO word - Transfers control to LABEL word * GPROP name prop - Outputs prop property of name * HEADING - Outputs turtle's heading * HIDETURTLE (HT) - Makes turtle invisible * HOME - Moves turtle to [ 0,0 ] and sets heading to 0 * IF pred list1 (list2) - If pred is TRUE, runs list1, otherwise list2 * IFFALSE (IFF) list - Runs list if most recent test was FALSE * IFTRUE (IFT) list - Runs list if most recent test was TRUE * INT n - Outputs integer portion of n * ITEM n obj - Outputs nth element of obj * KEYP - Outputs TRUE if a key has been typed but not yet read * LABEL word - Labels line for use by GO * LAST obj - Outputs last element of obj * LEFT (LT) n - Turns turtle n degrees left; counterclockwise * #LIST obj1 obj2 - Outputs list of its inputs * LISTP obj - Outputs TRUE if obj is a list * LOAD "name (pkg) - Loads file "name.LOGO from disk;loads into workspace * #LOCAL name - Makes name local * LPUT obj list - Outputs list formed by putting obj on end of list * MAKE "name obj - Makes name refer to obj * MEMBERP obj list - Outputs TRUE if obj is an element of list * NAME obj name - Makes obj the value of name * NAMEP word - Outputs TRUE if word refers to any object * NODES - Outputs number of free nodes * NOT pred - Outputs TRUE if pred is FALSE * NUMBERP obj - Outputs TRUE if obj is a number * #OR pred1 pred2 - Outputs TRUE if any of its inputs are true * OUTPUT (OP) obj - Return control to 'caller',with obj as output * PACKAGE package name(s) - Puts named procedures in package * PADDLE n - Outputs rotation of dial on paddle n * PAUSE - Makes procedure pause * PEN - Outputs pen condition; list containing type and color * PENCOLOR (PC) - Outputs number representing pen color * PENDOWN (PD) - Puts pen down * PENERASE (PE) - Puts pen's eraser down * PENREVERSE (PX) - Puts reversing pen down * PENUP (PU) - Pulls pen up * PKGALL package - Puts in package everything which is not already packaged * PLIST name - Outputs property list of name * PO name(s) - Prints definitions of named procedures * POALL (package(list)) - Prints definitions of procedures and names * PONS (package(list)) - Prints names and values of variables in (package(list)) * POPS (package(list)) - Prints definitions of procedures in (package(list)) * POS - Outputs position of turtle * POTS (package(list)) - Prints title lines of procedures in (package(list)) * PPS (package(list)) - Prints property list(s) of everything in (package(list)) * PRIMITIVEP name - Outputs TRUE if name is a primitive * #PRINT obj - Prints obj followed by RETURN (no brackets for lists) * #PRODUCT a b - Outputs product of its inputs * QUOTIENT a b - Outputs integer portion of a/b * RANDOM n - Outputs random non-negative integer less than n but greater than 1 * READCHAR (RC) - Outputs character typed by user; waits if necessary * READLIST (RL) - Outputs line typed by user; waits if necessary * RECYCLE - Performs a garbage collection * REMAINDER a b - Outputs remainder of a/b * REMPROP name prop - Removes property prop from name * REPARSE - Performs a reparsing * REPEAT n list - Runs list n times * RERANDOM - Makes random behave reproducibly * RIGHT (RT) - Turns turtle n degrees right; clockwise * ROUND n - Outputs n rounded off to nearest integer * RUN list - Runs list; outputs what list outputs * SAVE "name (package(list)) - Writes whole workspace or (package(list)) onto "name.LOGO * SCRUNCH - Outputs current aspect ratio * #SENTENCE (SE) obj1 obj2 - Outputs list of its inputs * SETBG n - Sets bacground color to color represented by n * SETCURSOR pos - Puts cursor at pos * SETDISK drive (slot) (volume) - Sets drive slot and volume number * SETHEADING (SETH) n - Sets turtle's heading to n degrees * SETPC n - Sets pencolor to color represented by n * SETPEN pair - Sets pen type and color to elements of pair * SETPOS pos - Moves turtle to pos * SETSCRUNCH n - Sets aspect ratio to n * SETX x - Moves turtle horizontally so that x-coordinate is x * SETY y - Moves turtle vertically so that y-coordinate is y * SHOW obj - Prints obj followed by return; with brackets for lists * SHOWNP - Outputs TRUE if turtle is shown * SHOWTURTLE (ST) - Makes turtle visible * SIN n - Outputs sine of n degrees * SPLITSCREEN ([ctrl-S]) - Splits screen; top for graphics, bottom for text * SQRT n - Outputs square root of n * STOP - Stops procedure and returns control to caller * #SUM a b - Outputs sum of its inputs * TEST pred - Remembers wether pred is TRUE or FALSE * TEXT name - Outputs definition of procedure name as a list * TEXTSCREEN ([ctrl-T]) - Devotes entire screen to text * THING name - Outputs object refered to by name * THROW name - Transfers control to corresponding CATCH * TO name (inputs) - Begins defining procedure name * TOWARDS pos - Outputs heading turtle would have if facing pos * #TYPE obj - Prints obj (no brackets for lists) * UNBURY (pkg) - Unburies procedures in (pkg) or workspace * WAIT n - Pauses for n 60ths of a second * WINDOW - Makes turtle field unbounded * WORD word1 word2 - Outputs word made up of its inputs * WORDP obj - Outputs TRUE if obj is a word * WRAP - Makes turtle field wrap around edges of the screen * XCOR - Outputs x-coordinate of turtle * YCOR - Outputs y-coordinate of turtle ----------------------------------------------------------------- * .BPT - Enters the Apple Monitor * .CONTENTS - Outputs list of names procedure names and other words * .DEPOSIT n a - Writes a into address n (decimal) * .EXAMINE n - Outputs contents of address n (decimal) * .PRINTER slot - Directs printing to printer instead of screen * .SCREEN - Directs printing to screen instead of printer --- I'm not sure ? ------------------------------------------------------------------------------- * a + b - Outputs a plus b * (a) - b - Outputs a minus b * a * b - Outputs a times b * a / b - Outputs a divided by b * a < b - Outputs TRUE if a is less than b * obj1=obj2 - Outputs TRUE if obj1 equals obj2 * a > b - Outputs TRUE if a is greater than b ---------------- EDITING COMMANDS ---------------- A bracket (]) indicates an EDITING COMMAND which works both inside and outside the editor. * ] (backspace) DELETE - Erases character to left of the cursor * ] (forward space) ADVANCE - Moves cursor forward one space * ] CTRL-A - Moves cursor to beginning of current line * ] CTRL-B - Moves cursor one space backwards * CTRL-C - Exits from editor; editor accept; reading buffer as if just typed in * ] CTRL-D - Erases character at current position * ] CTRL-E - Moves cursor to the end of the currnet line * ] CTRL-F - Moves cursor one space forward * CTRL-G - Interrupts running procedure; stopped ! * ] CTRL-H (backspace) DELETE - Erases character to left of cursor * ] CTRL-K - Erases everything on current line to the right of the cursor * CTRL-L - Scrolls screen to put current line at center of the screen (in editor) * CTRL-L - Devotes entire screen to graphics (outside of editor) * CTRL-M - Same as RETURN * CTRL-N - Moves cursor down to next line * CTRL-O - Opens new line at position of cursor * CTRL-P - Moves cursor up to previous line * ] CTRL-Q - Quotes next character you type; prints a backslash; allows use of arithmetic functions in prints * CTRL-S - Splits screen; top for graphics, bottom for text * CTRL-T - Devotes entire screen to text * ] CTRL-U - Moves cursor one space forward * CTRL-V - Scrolls screen to next page * CTRL-W - Makes LOGO stop until another character is typed * ] CTRL-Y - Inserts the contents of the kill buffer * CTRL-Z - Interrupts running procedure making it pause ----------- MAGIC WORDS ----------- * END - Tells LOGO that you are done defining a procedure * ERRACT - System Variable: If TRUE, LOGO pauses when error occurs * ERROR - Tag for THROW when error occurs * FALSE - Special input for and if not or and test * PROCPKG - Property of procedure name; value is its package * REDEFP - System Variable: If TRUE, primitives may be redefined * STARTUP - System Variable: If a list, LOGO runs it after starting up * TOPLEVEL - Tag for THROW to return control to top-level (user) * TRUE - Special input for and if not or and test * VALPKG - Property of variable name; value is its package * .SYSTEM - Package containing ERRACT and REDEFP (initially buried) -------------------------------------------------------------------- THAT'S ALL FOLKS!