LOGOHELP.TXT (Edited by Emmanuel ROCHE.) ------------ It's easy to read this HELP file in resolution 0 or 1. You can use HELP to: 1. Get information about a particular primitive and its format with a brief example. Enter HELP followed by a quoted primitive name or a quoted primitive abbreviation and then press ENTER. For example: HELP "TURTLETEXT 2. See the next portion and any following portions of the list of Dr. Logo primitives, press any key. To stop the display of the list, use Ctrl-G. For detailed information about any primitive or its format, look in the Dr. Logo Dictionary. ABS ALLOPEN AND ARCTAN ASCII BACK BURY BUTFIRST BK BUTLAST BF BUTTONP BL BYE CATCH CHANGEF CHAR CLEAN CLEARSCREEN CLEARTEXT CLOSE CS CT CLOSEALL CO COPYDEF COPYOFF COPYON COS COUNT CURSOR DEFAULTD DEFINE DEFINEDP DEGREES DIR DIRPIC DOT DOTC EDALL EDF EDIT EDNS EDPS ED EFORM EMPTYP END EQUALP ERALL ERASE ERASEFILE ERASEPIC ER ERN ERNS ERPS ERROR EXP FENCE FILL FIRST FOLLOW FORM FORWARD FPUT FULLSCREEN FD GLIST FS GO GPROP HELP HIDETURTLE HOME IF HT IFFALSE IFTRUE INT IFF IFT ITEM KEYP LABEL LAST LEFT LIST LISTP LT LOAD LOADPIC LOCAL LOG LOG10 LOWERCASE LPEN LPENP LC LPUT MAKE MEMBERP NAME NAMEP NODES NOFORMAT NOT NOTRACE NOWATCH NUMBERP OPEN OR OUTPUT PACKAGE PADDLE OP PAUSE PENDOWN PENERASE PENREVERSE PD PE PX PENUP PI PIECE PU PKGALL PLIST PO POALL POCALL PONS POPKG POPS POREF POTL POTS PPROP PPS PREC PRIMITIVEP PRINT PROCLIST PRODUCT PR QUOTIENT RADIANS RANDOM READCHAR READEOFP READER RC READLIST READQUOTE RECYCLE RL RQ REMAINDER REMPROP REPEAT RERANDOM RIGHT ROUND RUN RT SAVE SAVEPIC SCREENFACTS SENTENCE SETBG SF SE SETCURSOR SETD SETHEADING SETPAN SETPC SETH SETPEN SETPOS SETPREC SETREAD SETRES SETSCRUNCH SETSPLIT SETWRITE SETX SETY SETZOOM SHOW SHOWTURTLE SHUFFLE SIN ST SORT SPLITSCREEN SQRT STOP SS SUM TAN TEST TEXT TEXTSCREEN THING THROW TS TO TONES TOWARDS TRACE TURTLEFACTS TURTLETEXT TYPE TF TT UNBURY UPPERCASE WAIT WATCH UC WHERE WINDOW WORD WORDP WRAP WRITER * + - / < <= <> = =< => > >= >< .COLOROFF .COLORON .CONTENTS .DEPOSIT .EXAMINE .IN .OUT .REPLACE .REPTAIL .SETSEG ABS --- ABS n Outputs the absolute value of the input number. ?ABS -3 3 ALLOPEN ------- ALLOPEN Outputs a list of all data files currently open. ?ALLOPEN AND --- AND pred_exp (...) Outputs TRUE if all input predicate expressions output true; otherwise outputs FALSE. ?AND (3<4) (7>4) TRUE ARCTAN ------ ARCTAN n Outputs the arc tangent (inverse tangent) of the input number. ?ARCTAN 2 63.434948822922 ASCII ----- ASCII word Outputs the ASCII value of the first character in the input word. ?ASCII "G 71 BK -- BK distance_n Moves the turtle the input number of steps in the opposite direction of its heading. ?BK 50 BURY ---- BURY pkgname | pkgname_list Hides the specified package(s) from subsequent work space management commands: EDALL, EDNS, EDPS, ERALL, ERNS, ERPS, GLIST, POALL, PONS, POPS, POTS, PPS, SAVE ?BURY LTRPACK BF -- BF object Outputs all but the first element in the input object. ?BF "SMILES MILES BL -- BL object Outputs all but the last element in the input object. ?BL [1 2 3 4] [1 2 3] BUTTONP ------- BUTTONP paddle_n Outputs TRUE if the button on the specified paddle or joystick is down; otherwise outputs FALSE. Paddle buttons are specified by numbers 0, 1, 2, or 3. 0 = button 1, paddle 1 1 = button 2, paddle 1 2 = button 1, paddle 2 3 = button 2, paddle 2 ?BUTTONP 0 BYE --- BYE Exits current session of Dr. Logo. ?BYE CATCH ----- CATCH name instr_list Runs instr_list until THROW identifies an error or special condition; control returns to CATCH and executes the line following it. TRUE and ERROR are two special names to use with CATCH. ?CATCH "ERROR [+ [] []] PR [ I AM HERE ] I AM HERE CHANGEF ------- CHANGEF new_fname old_fname Changes the name of a file in the disk directory. ?CHANGEF "NEWFILE "OLDFILE CHAR ---- CHAR n Outputs the character whose ASCII value is the input number. ?CHAR 83 S CLEAN ----- CLEAN Erases the viewport without affecting the turtle. ?CLEAN CS -- CS Erases the viewport and puts the turtle at [0 0] heading 0 (north) with the pen down. ?CS CT -- CT Erases all text in the text window and positions the cursor in the upper-left corner of the window. ?CT CLOSE ----- CLOSE fname Closes the named data file. ?CLOSE "LETTERS CLOSEALL -------- CLOSEALL Closes all the data files currently open. ?CLOSEALL CO -- CO Ends a pause caused by PAUSE, a Ctrl-Z keystroke, or ERRACT. ?CO COPYDEF ------- COPYDEF new_procname old_procname Makes a copy of a procedure definition with another name. ?COPYDEF "square "box COPYOFF ------- COPYOFF Stops echoing text at the printer. ?COPYOFF COPYON ------ COPYON Starts echoing text at the printer. ?COPYON COS --- COS degrees_n Outputs the cosine of the input number of degrees. ?COS 60 0.5 COUNT ----- COUNT object Outputs the number of elements in the input object. ?COUNT "six 3 CURSOR ------ CURSOR Outputs a coordinate list, [x y], that contains the column and line numbers of the cursor's position within the text window. ?CURSOR DEFAULTD -------- DEFAULTD Outputs the name of the current default drive. ?DEFAULTD A: DEFINE ------ DEFINE procname defin_list Makes the input definition list the definition of the specified procedure name. ?DEFINE "SAY.Hi [[] [PR [Hi!]] ?SAY.Hi Hi! DEFINEDP -------- DEFINEDP object Outputs TRUE if the input name identifies a defined procedure; otherwise outputs FALSE. ?DEFINEDP "SAY.Hi TRUE DEGREES ------- DEGREES radians_n Outputs the number of degrees in the input number of radians. ?DEGREES 25 1432.39448782706 DIR --- DIR Outputs a list of Dr. Logo file names on the default or specified disk; accepts an ambiguous file name. ?DIR [KETCHAM.LOG] DIRPIC ------ DIRPIC Outputs a list of picture files on the default or specified disk; accepts an ambiguous file name. ?DIRPIC [FLOWER.PIC FACE.PIC SQUARE.PIC] DOT --- DOT coord_list Plots a dot at the position specified by the input coordinate list using the current pencolor and penstate. ?DOT [50 10] DOTC ---- DOTC coord_list Outputs the color number of the dot at the coordinates specified, or -1 if the location is not on the graphic viewport. ?DOTC [50 10] 2 ED -- ED Loads the specified procedure(s) and/or variable(s) into the text editor's buffer. ?ED "BOX EDALL ----- EDALL Loads all the procedures and variables in the workspace or the specified package(s) into the text editor's buffer. ?EDALL "DRAW.PACK EDF --- EDF fname Loads the specified disk file into the text editor's buffer or creates a new file and enters the text editor with an empty buffer. ?EDF "STARTUP EDNS ---- EDNS Loads all the variables in the workspace or the specified package(s) into the text editor's buffer. ?EDNS "PRACTICE EDPS ---- EDPS Loads all the procedures in the workspace or specified package(s) into the text editor's buffer. ?EDPS "PLAYPACK EFORM ----- EFORM n1 n2 Outputs n1 in scientific notation, using n2 digits. n2 must be a positive, real number from 1 through 15. ?EFORM 1.2 1 1.E+000 EMPTYP ------ EMPTYP object Outputs TRUE if the input object is an empty word or an empty list; otherwise outputs FALSE. ?EMPTYP " TRUE END --- END Signals the end of a procedure definition. ?TO SQUARE >REPEAT 4 [FD 50 RT 90] >END EQUALP ------ EQUALP object object Outputs TRUE if input objects are equal numbers, identical words or identical lists; otherwise outputs FALSE. ?EQUALP "POP "POP TRUE ER -- ER procname | procname_list Erases the specified unburied procedure(s) from the workspace. ?ER "BOX ERALL ----- ERALL Erases all the unburied procedures and variables from the workspace or the specified unburied package(s). ?ERALL ERASEFILE --------- ERASEFILE fname Erases the specified disk file; accepts an ambiguous file name. ?ERASEFILE "BEAR. ERASEPIC -------- ERASEPIC fname Erases the specified picture file(s); accepts an ambiguous file name. ?ERASEPIC "D??????? ERN --- ERN varname | varname_list Erases the specified unburied variable(s) from the workspace. ?ERN [SIDE ANGLE] ERNS ---- ERNS Erases all unburied variables from the workspace or the specified unburied package(s). ?ERNS "MEDIUM ERPS ---- ERPS Erases all unburied procedures from the workspace or the specified unburied package(s). ?ERPS [DRAW.PACK MOVE.PACK] ERROR ----- ERROR Outputs a list whose elements describe the most recent error. ?ERROR EXP --- EXP n Outputs the natural exponent of the input number. ?EXP 1 2.7182818284545 FD -- FD distance_n Moves turtle the input number of steps in the direction of its current heading. ?FD 100 FENCE ----- FENCE Establishes a boundary that limits the turtle to plotting within the viewport. ?FENCE FILL ---- FILL Fills an area with the current pencolor by changing the dot under the turtle (and all horizontally and vertically contiguous dots of the same color) to the current pencolor, using the current penstate. ?FILL FIRST ----- FIRST object Outputs the first element of the input object. ?FIRST "ZEBRA Z FOLLOW ------ FOLLOW procname procname Reorganizes the workspace so the first input-named procedure is followed by the second. It changes the order in which the procedures are displayed. ?FOLLOW "BUZZ "ZOOM FORM ---- FORM n1 n2 Outputs a number, n1, with n2 digits before the decimal and n3 after it. n1 must be a positive, real number from 1 through 15. If n1 is not an integer, it is rounded to the nearest integer. If n3 is omitted, it is assumed to be zero and the decimal point and any digits after it are not printed. ?FORM 1.234 2 1 FPUT ---- FPUT object object Outputs a new object formed by making the first input object the first element in the second input object. ?FPUT "S "MILES SMILES FS -- FS Changes the viewport mode from SPLITSCREEN or TEXTSCREEN and dedicates the monitor to graphics. ?FS GLIST ----- GLIST prop Outputs a list of all objects in the workspace or specified package(s) that have the input property in their property lists. ?GLIST ".DEF GO -- GO word Executes the line within the current procedure following a LABEL expression with the same input word. ?GO "LOOP GPROP ----- GPROP name prop Outputs the value of the named property of the named object. ?GPROP "HEIGHT ".APV 72 HEADING ------- HEADING Outputs the turtle's current heading as a real number from 0 through 359 that is a compass heading. ?HEADING 126 HELP ---- HELP Without an input displays the instructions on how to use the HELP facility and a list of the primitives. Specify a primitive name and you get a display of the primitive definition, a description of the primitive, and a short example. ?HELP HOME ---- HOME Returns the turtle to position [0 0] heading 0 (north). ?HOME HT -- HT Makes the turtle invisible, which speeds and clarifies the drawing. ?HT IF -- IF pred_exp instr_list Executes one of two literal instruction lists depending on the value of the input predicate expression. ?IF (A > B) [PR [A IS BIGGER]] [PR [B IS BIGGER]] IFF --- IFF instr_list Executes the input instruction list if the most recent TEST expression was FALSE. ?IFF [PR [TAILS YOU LOSE!] STOP] IFT --- IFT instr_list Executes the input instruction list if the most recent TEST expression was TRUE. ?IFT [TYPE "HEADS] INT --- INT n Outputs the integer portion of the input number. ?INT 3.33 3 ITEM ---- ITEM n object Outputs the specified element of the input object. ?ITEM 4 "DWARF R KEYP ---- KEYP Outputs TRUE if a character has been typed at the keyboard and is waiting to be read. ?KEYP LABEL ----- LABEL word Identifies the line to be executed after a GO expression with the input word. ?LABEL "LOOP LAST ---- LAST object Outputs the last element of the input object. ?LAST [0 2 4] 4 LC -- LC word Outputs the input word with all alphabetic characters in lower case. ?LC "SOUTH south LT -- LT degrees_n Rotates the turtle the input number of degrees to the left. ?LT 90 LIST ---- LIST object object (...) Outputs a list made up of the input objects, retains the lists' outer brackets. ?LIST "BIG [FEET] [BIG [FEET]] LISTP ----- LISTP object Outputs TRUE if the input object is a list; otherwise outputs FALSE. ?LISTP "WORD FALSE LOAD ---- LOAD fname Reads the input-named Dr. Logo file (file type LOG) from the disk into the workspace; optionally packages the file into the input named package. ?LOAD "SIMPLE LOADPIC ------- LOADPIC fname Paints the graphic design saved in the input-named picture file onto the graphic viewport. ?LOADPIC "B:DESIGNS LOCAL ----- LOCAL varname (...) Makes the input-named variable(s) accessible only to the current procedure and the procedures it calls. ?LOCAL "X "Y LOG --- LOG n Outputs the natural logarithm of the input number. ?LOG 2 0.693147180559945 LOG10 ----- LOG10 n Outputs the base 10 common logarithm of the input number. ?LOG10 100 2 LPEN ---- LPEN Outputs a coordinate list, [x y], that indicates the position of the light pen. LPEN is only valid after LPENP returns TRUE. ?LPEN LPENP ----- LPENP Outputs TRUE if lightpen input is waiting to be read. ?LPENP LPUT ---- LPUT object object Outputs a new object formed by making the first input object the last element in the second input object. ?LPUT 4 [1 2 3] [1 2 3 4] MAKE ---- MAKE varname object Makes the input-named variable the value of the input object. ?MAKE "SIDE 50 MEMBERP ------- MEMBERP object object Outputs TRUE if the first input object is an element of the second input object; otherwise outputs FALSE. ?MEMBERP "Y "ONLY TRUE NAME ---- NAME object varname Makes the input object the value of the input-named variable. ?NAME 50 "SIDE NAMEP ----- NAMEP word Outputs TRUE if the input word identifies a defined variable; otherwise outputs FALSE. ?NAMEP "FLAVOR TRUE NODES ----- NODES Outputs the number of free nodes in the workspace; 1 node = 4 bytes. ?NODES 2684 NOFORMAT -------- NOFORMAT Removes procedure formatting, including comments, from the workspace. ?NOFORMAT NOT --- NOT pred_exp Outputs TRUE if the input predicate expression is FALSE; FALSE if the input predicate is TRUE. ?NOT (3 = 4) TRUE NOTRACE ------- NOTRACE Turns off trace monitoring of procedure execution. ?NOTRACE NOWATCH ------- NOWATCH Turns off watch monitoring of all or specified procedure(s). ?NOWATCH NUMBERP ------- NUMBERP object Outputs TRUE if the input object is a number; otherwise outputs FALSE. ?NUMBERP "TWO FALSE OP -- OP object Makes input object the output of the procedure and exits the procedure at that point. The following example outputs from within a procedure. IF 24 = 4 * 6 [OP "TRUE] TRUE OPEN ---- OPEN fname | device Open the file or device to send or receive characters. OPEN must be used before accessing data in a file. ?OPEN "LETTERS OR -- OR pred_exp pred_exp (...) Outputs FALSE if all input predicate expressions output FALSE; otherwise outputs TRUE. ?OR "TRUE (1+3) TRUE PACKAGE ------- PACKAGE pkgname name | name_list Puts the name(s) into the input named package. ?PACKAGE "SIZES [BIG MEDIUM SMALL] PADDLE ------ PADDLE n Outputs a number that represents a paddle or joystick input coordinate. The number returns: 0 = x coordinate of paddle 1 1 = y coordinate of paddle 1 2 = x coordinate of paddle 2 3 = y coordinate of paddle 2 ?PADDLE 2 PAUSE ----- PAUSE Suspends the execution of the current procedure to allow interaction with the interpreter or editor. ?PAUSE PD -- PD Puts the turtle's pen down; the turtle resumes drawing. ?PD PE -- PE Makes the turtle draw in the background color; the turtle erases drawn lines. ?PE PU -- PU Picks the turtle's pen up; the turtle stops drawing. ?PU PI -- PI Outputs the value of pi. ?PI 3.14159265358979 PIECE ----- PIECE n n object Outputs an object that contains the specified elements of the input object. ?PIECE 3 6 "INDUSTRY DUST PKGALL ------ PKGALL pkgname Puts all procedures and variables not already in packages into the specified package. ?PKGALL "OTHER PLIST ----- PLIST name Outputs the property list of the input-named object. ?PLIST "BIRD [.APV BLUE] PO -- PO name | name_list Displays the definition(s) of the specified procedure(s) or variable(s). ?PO "SQUARE TO SQUARE :SIZE REPEAT 4 [FD :SIZE RT 90] END POALL ----- POALL Displays the definitions of all procedures and variables in the workspace or in the specified package(s). ?POALL POCALL ------ POCALL procname Displays the names of the procedures called by the input-named procedure. ?POCALL PONS ---- PONS Displays the names and values of all variables in the workspace or the specified package(s). ?PONS POPKG ----- POPKG Displays the name and contents of each or the specified package(s). ?POPKG POPS ---- POPS Displays the names and definitions of all procedures in the workspace or the specified package(s). ?POPS POREF ----- POREF procname | procname_list Displays the names of the procedures that call the input-named procedure(s). ?POREF "TRIANGLE TO FLAG POTL ---- POTL Displays the names of the TOPLEVEL procedures, procedures not called by any other procedure in the workspace. ?POTL POS --- POS Outputs a coordinate list of the turtle's current position. ?POS POTS ---- POTS Displays the names and inputs of all procedures in the workspace or the specified package(s). ?POTS PPROP ----- PPROP name propname prop.val Puts the input property pair into the name's property list. ?PPROP "DUNGEONMASTER ".APV "SCOTT PPS --- PPS Displays the non-system property pairs of all objects in the workspace or the specified package(s). ?PPS KATHY'S EXTENSION is 82 PR -- PR object (...) Outputs the input object(s) on the text window, file or device. PRINT removes lists' outer brackets and follows last input with a carriage return. ?PRINT [A B C] A B C PREC ---- PREC Outputs the number of significant digits displayed in an output number. ?PREC 6 PRIMITIVEP ---------- PRIMITIVEP object Outputs TRUE if the input object is a primitive name; otherwise outputs FALSE. ?PRIMITIVEP "TEST TRUE PROCLIST -------- PROCLIST Outputs a list that contains the names of all defined procedures. ?PROCLIST PRODUCT ------- PRODUCT n n (...) Outputs the product of the input numbers. ?PRODUCT 7 6 42 PX -- PX Makes the turtle change the color of any previously colored pixel in its trail to the reverse or logical color complement. ?PX QUOTIENT -------- QUOTIENT n n Outputs the integer quotient of the two input numbers and truncates the input numbers to integers before dividing. ?QUOTIENT 10 4 2 RADIANS ------- RADIANS degrees_n Outputs the number of radians in the input number of degrees. ?RADIANS 90 1.5707963267949 RANDOM ------ RANDOM n Outputs a random non-negative integer less than the input number. ?RANDOM 20 9 RC -- RC Outputs the first character typed at the keyboard or input from a file or device. ?RC Z READEOFP -------- READEOFP Outputs TRUE if the current data file is at the end; otherwise outputs FALSE. You must use OPEN and SETREAD before you use READEOFP. ?OPEN "TELNOS ?SETREAD "TELNOS ?READEOFP FALSE READER ------ READER Outputs the current file name that is open for reading. ?READER [A:BOOKLIST.DAT] RECYCLE ------- RECYCLE Frees as many nodes as possible and reorganizes the workspace. ?RECYCLE REMAINDER --------- REMAINDER n n Outputs the integer remainder obtained when the first input number is divided by the second. ?REMAINDER 7 3 1 REMPROP ------- REMPROP name prop Removes the specified property from the name's property list. ?REMPROP "PACK "COLOR REPEAT ------ REPEAT n instr_list Executes the input instruction list the input number of times. ?REPEAT 4 [FD 50 RT 90] RERANDOM -------- RERANDOM Makes a subsequent RANDOM or SHUFFLE expression reproduce the same random sequence. ?RERANDOM RL -- RL Outputs a list that contains a line typed at the keyboard (input must be followed by a carriage return) or input from a file. ?RL 1 2 3 [1 2 3] RQ -- RQ Outputs a word that contains a line typed at the keyboard (input must be followed by a carriage return) or input from a file. ?RQ 1 2 3 1 2 3 RT -- RT degrees_n Rotates the turtle the input number of degrees to the right. ?RT 45 ROUND ----- ROUND n Outputs the input number rounded off to the nearest integer. ?ROUND 3.333 3 RUN --- RUN instr_list Executes the input instruction list. ?RUN [PR 1] 1 SAVE ---- SAVE fname Writes the contents of the workspace or specified package(s) to the input named disk file. With just fname specified, SAVE writes all procedures and variables except those in buried packages. With two inputs, SAVE copies all procedure definitions as well as MAKE, PPROP, and PACKAGE command assignments. ?SAVE "ABC SAVEPIC ------- SAVEPIC fname Writes the contents of the viewport to the input-named picture file. ?SAVEPIC "DESIGN3 SE -- SE object object (...) Outputs a list made up of the input objects, removes lists' outer brackets. ?SE "HARE [RABBIT BUNNY] [HARE RABBIT BUNNY] SETBG ----- SETBG color_n Sets the viewport background to the color represented by the input number. ?SETBG 1 SETCURSOR --------- SETCURSOR coord_list Positions the cursor at the location specified by the input text window coordinate list. ?SETCURSOR [50 10] SETD ---- SETD d: Makes the specified drive the default drive. ?SETD "B: SETH ---- SETH degrees_n Turns the turtle to the absolute heading specified by the input number of degrees; positive numbers turn the turtle clockwise; negative numbers counter-clockwise. ?SETH 90 SETPAN ------ SETPAN coord_list Establishes the center point of the viewport. ?SETPAN [50 50] SETPC ----- SETPC color_n Sets the turtle's pen to the color specified by the input color number. ?SETPC 2 SETPEN ------ SETPEN list Sets the turtle's pen to the state and color specified in the input list. ?SETPEN [PD 2] SETPOS ------ SETPOS coord_list Moves the turtle to the position specified in the input coordinate list. ?SETPOS [0 0] SETPREC ------- SETPREC n Sets the number of significant digits displayed in an output number. ?SETPREC 10 SETREAD ------- SETREAD fname Sets the data file from which to receive input. After this command you use READLIST, READCHAR, and READQUOTE to read the data from the file or device. ?OPEN "TELNOS ?SETREAD "TELNOS ?READLIST [TERRY CLOTH] SETRES ------ SETRES n Sets the resolution of the viewport. Available resolutions are 0 (high), 1 (medium), and 2 (low - only on the PCjr). Changes the default and maximum values for many of the parameters that effect the appearance of your text and graphic displays. ?SETRES 1 SETSCRUNCH ---------- SETSCRUNCH n Sets the viewport vertical aspect ratio to the input number that can be from 1 through 5. ?SETSCRUNCH 5 SETSPLIT -------- SETSPLIT n Sets the number of lines in the splitscreen's text window; the input number must be from 1 through 5. ?SETSPLIT 3 SETWRITE -------- SETWRITE fname | device Sets the destination of outputs from PRINT, TYPE, and SHOW to the data file or system device. The file or device must already be open. SETWRITE sets the file position at top of the file. ?OPEN "PHONES ?SETWRITE "PHONES SETX ---- SETX n Moves the turtle horizontally to the x coordinate specified by the input number. ?SETX -50 SETY ---- SETY n Moves the turtle vertically to the y coordinate specified by the input number. ?SETY 90 SETZOOM ------- SETZOOM n Causes the viewport to show a greater or lesser portion of the graphic plane, thereby expanding or contracting subsequent turtle motion. Doesn't clear the viewport nor alter anything previously drawn. ?SETZOOM 2 SF -- SF Outputs a list that contains: Background color number of the viewport; Screen state; Split size; Window state; Scrunch ratio; Zoom factor; X-coordinate and y-coordinate of viewport center; Current resolution setting. ?SF [2 SS 25 WRAP 2 2 100 100 2] SHOW ---- SHOW object Outputs the input object on the text window or to a file or device. SHOW retains the list's outer brackets, follows the input with a carriage return. ?SHOW [A B C] [A B C] SHUFFLE ------- SHUFFLE list Outputs a list that contains the elements of the input list in random order. ?SHUFFLE [1 2 3 4] [3 2 4 1] SIN --- SIN degrees_n Outputs the sine of the input number of degrees. ?SIN 30 0.5 SORT ---- SORT list Outputs a list of input words sorted into ascending order. ?SORT [Z 2 T * A 4] [* 2 4 A T Z] SQRT ---- SQRT n Outputs the square root of the input number. ?SQRT 25 5 SS -- SS Displays a window of text on the graphic viewport. ?SS ST -- ST Makes the turtle visible if hidden. ?ST STOP ---- STOP Stops the execution of the current procedure and returns to TOPLEVEL. ?STOP SUM --- SUM n n (...) Outputs the sum of the input numbers. ?SUM 5 9 14 TAN --- TAN degrees_n Outputs the tangent of the input angle. ?TAN 45 1 TEST ---- TEST pred_exp Remembers whether the input predicate is TRUE or FALSE for subsequent IFF or IFT expressions. ?TEST 2 = 2 TEXT ---- TEXT procname Outputs the definition list of the specified procedure. ?TEXT "SQUARE TF -- TF Outputs a list that contains: Turtle's x coordinate; Turtle's y coordinate; Turtle's heading; Penstate; Pen's color number; TRUE if the turtle is visible, FALSE if not. ?TF [15 30 60 PE 3 FALSE] THING ----- THING varname Outputs the value of the input-named variable. ?THING "FLAVOR CHOCOLATE THROW ----- THROW name Executes the line identified by the input name in a previous CATCH expression. ?THROW "CUSTOM.ERROR TO -- TO procname Indicates the beginning of a procedure definition. ?TO SQUARE >REPEAT 4 [FD 50 RT 90] >END TONES ----- TONES note_list Outputs a note of the frequency and duration specified in the input note_list. ?TONES [440 440] TOWARDS ------- TOWARDS coord_list Outputs a heading that would make the turtle face the position specified in the input coordinate list. ?TOWARDS [20 10] TRACE ----- TRACE Turns on trace monitoring of procedure execution and variable assignment; displays the name of each procedure as it is called and the name and value of each variable as it is defined. ?TRACE TS -- TS Selects a full text window. ?TS TT -- TT object (...) Displays the input object(s) on the graphic viewport at the character position closest to the turtle's position using the current pen color and state. TT removes the outer brackets from any input list and does not move the turtle. ?TT "HOME FORWARD 10 TYPE ---- TYPE object (...) Outputs the input object(s) on the text window to a data file or system device. TYPE removes lists' outer brackets; does not follow last input with a carriage return. ?TYPE [a b c] a b c UNBURY ------ UNBURY pkgname | pkgname_list Restores the specified package(s) to workspace management commands. ?UNBURY "TITLES UC -- UC word Outputs the input word with all alphabetic characters in uppercase. ?UC "Shawn SHAWN WAIT ---- WAIT n Delays procedure execution for the amount of time specified by the input number. ?WAIT 50 WATCH ----- WATCH Turns on the expression-by-expression procedure execution monitor that pauses before the execution of each statement, to allow interaction with the interpreter or editor. ?WATCH WHERE ----- WHERE Outputs the item number of the most recent successful MEMBERP expression. ?MEMBERP "R [Q R S] TRUE ?WHERE 2 WINDOW ------ WINDOW Allows the turtle to plot outside the viewport after a WRAP or FENCE expression. ?WINDOW WORD ---- WORD word word (...) Outputs a word made up of the input words. ?WORD "SUN "SHINE SUNSHINE WORDP ----- WORDP object Outputs TRUE if the input object is a word or a number; otherwise outputs FALSE. ?WORDP "Narnia TRUE WRAP ---- WRAP Makes the turtle reappear on the opposite side of the viewport when it exceeds the boundary. ?WRAP WRITER ------ WRITER Outputs the current data file that is open for writing. ?WRITER [A:ADDRESS.DAT] XCOR ---- XCOR Outputs the x coordinate of the turtle's current position. ?XCOR 19 YCOR ---- YCOR Outputs the y coordinate of the turtle's current position. ?YCOR -19 * (Multiply) ------------ * a b (...) or a * b This prefix or infix primitive and delimiter outputs the product of the input numbers. ?4 * 6 24 + (Plus) -------- + a b (...) or a + b This prefix or infix primitive and delimiter outputs the sum of the input numbers. ?2 + 2 4 - (Minus) --------- - a b or a - b This prefix or infix primitive and delimiter outputs the difference of the two input numbers. ?10 - 5 5 / (Divide) ---------- / a b or a / b This prefix or infix primitive and delimiter outputs the decimal quotient of the two input numbers. ?25/5 5 < (Less than) ------------- < a b or a < b This prefix or infix primitive and delimiter outputs TRUE if the first input word is less than the second, otherwise outputs FALSE. ?13 < 27 TRUE <= (Less or equal) ------------------ <= a b or a <= b This prefix or infix primitive and delimiter outputs TRUE if the first input word is less than or equal to the second, otherwise outputs FALSE and is a synonym for =<. ?13 <= 27 TRUE =< (Equal or less) ------------------ =< a b or a =< b This prefix or infix primitive and delimiter outputs TRUE if the first input word is less than or equal to the second, otherwise outputs FALSE and is a synonym for <=. ?13 =< 27 TRUE <> (Not equal) -------------- <> a b or a <> b This prefix or infix primitive and delimiter outputs TRUE if the two objects are not equal, otherwise outputs FALSE and is a synonym for ><. ?<>1 2 TRUE = (Equal) --------- = a b or a = b This prefix or infix primitive and delimiter outputs TRUE if the two input objects are equal, otherwise outputs FALSE. ?1 = 2 FALSE > (Greater than) ---------------- > a b or a > b This prefix or infix primitive and delimiter outputs TRUE if the first input word is greater than the second, otherwise outputs FALSE. ?20 > 19 TRUE => (Equal or greater) --------------------- => a b or a => b This prefix or infix primitive and delimiter outputs TRUE if the first input word is greater-than or equal to the second, otherwise outputs FALSE and is a synonym for >=. ?3 => 1 TRUE >= (Greater or equal) --------------------- >= a b or a >= b This prefix or infix primitive outputs TRUE if the first input word is greater-than or equal to the second, otherwise outputs FALSE and is a synonym for =>. ?>=3 4 FALSE >< (Not equal) -------------- >< a b or a >< b This prefix or infix primitive and delimiter outputs TRUE if the two objects are not equal, otherwise outputs FALSE and is a synonym for <>. <>1 2 TRUE BACK ---- BACK distance_n Moves the turtle the input number of steps in the opposite direction of its heading. ?BACK 50 BUTFIRST -------- BUTFIRST object Outputs all but the first element in the input object. ?BUTFIRST "SMILES MILES BUTLAST ------- BUTLAST object Outputs all but the last element in the input object. ?BUTLAST [1 2 3 4] [1 2 3] CLEARSCREEN ----------- CLEARSCREEN Erases the viewport and puts the turtle at [0 0] heading 0 (north) with the pen down. ?CLEARSCREEN CLEARTEXT --------- CLEARTEXT Erases all text in the window that currently contains the cursor then positions the cursor in the upper-left corner of the window. ?CLEARTEXT EDIT ---- EDIT Loads the specified procedure(s) and/or variable(s) into the text editor's buffer. ?EDIT "BOX ERASE ----- ERASE procname | procname_list Erases the specified unburied procedure(s) from the workspace. ?ERASE "BOX FORWARD ------- FORWARD distance_n Moves turtle the input number of steps in the direction of its current heading. ?FORWARD 100 FULLSCREEN ---------- FULLSCREEN Changes the viewport mode from SPLITSCREEN or TEXTSCREEN and dedicates the monitor to graphics. ?FULLSCREEN HIDETURTLE ---------- HIDETURTLE Makes the turtle invisible; also speeds and clarifies the drawing. ?HIDETURTLE IFFALSE ------- IFFALSE instr_list Executes the input instruction list if the most recent test expression was FALSE. ?IFFALSE [PR [TAILS YOU LOSE!] STOP] IFTRUE ------ IFTRUE instr_list Executes the input instruction list if the most recent test expression was TRUE. ?IFTRUE [TYPE "HEADS] LEFT ---- LEFT degrees_n Rotates the turtle the input number of degrees to the left. ?LEFT 90 LOWERCASE --------- LOWERCASE word Outputs the input word with all alphabetic characters in lower case. ?LOWERCASE "SOUTH south OUTPUT ------ OUTPUT object Makes input object the output of the procedure and exits the procedure at that point. The following example outputs from within a procedure. IF 24 = 4 * 6 [OUTPUT "TRUE] TRUE PENDOWN ------- PENDOWN Puts the turtle's pen down; the turtle resumes drawing. ?PENDOWN PENERASE -------- PENERASE Makes the turtle draw in the background color; the turtle erases drawn lines. ?PENERASE PENREVERSE ---------- PENREVERSE Makes the turtle change the color of any previously colored pixel in its trail to the reverse or logical color complement. ?PENREVERSE PENUP ----- PENUP Picks the turtle's pen up; the turtle stops drawing. ?PENUP PRINT ----- PRINT object (...) Outputs the input object(s) on the text window, file or device. PRINT removes lists' outer brackets and follows last input with a carriage return. ?PRINT [A B C] A B C READCHAR -------- READCHAR Outputs the first character typed at the keyboard or input from a file or device. ?READCHAR Z READLIST -------- READLIST Outputs a list that contains a line typed at the keyboard (input must be followed by a carriage return) or input from a file or device. ?READLIST 1 2 3 [1 2 3] READQUOTE --------- READQUOTE Outputs a word that contains a line typed at the keyboard (input must be followed by a carriage return) or input from a file or device. ?READQUOTE 1 2 3 1 2 3 RIGHT ----- RIGHT degrees_n Rotates the turtle the input number of degrees to the right. ?RIGHT 45 SCREENFACTS ----------- SCREENFACTS Outputs a list that contains: Background color number of the viewport; Screen state; Split size; Window state; Scrunch ratio; Zoom factor; X-coordinate and y-coordinate of viewport center; Current resolution setting. ?SCREENFACTS [2 SS 25 WRAP 2 2 100 100 2] SENTENCE -------- SENTENCE object object (...) Outputs a list made up of the input objects, removes lists' outer brackets. ?SENTENCE "HARE [RABBIT BUNNY] [HARE RABBIT BUNNY] SETHEADING ---------- SETHEADING degrees_n Turns the turtle to the absolute heading specified by the input number of degrees; positive numbers turn the turtle clockwise; negative numbers counter-clockwise. ?SETHEADING 90 SHOWTURTLE ---------- SHOWTURTLE Makes the turtle visible if hidden. ?SHOWTURTLE SPLITSCREEN ----------- SPLITSCREEN Displays a window of text on the viewport. ?SPLITSCREEN TEXTSCREEN ---------- TEXTSCREEN Selects a full text window. ?TEXTSCREEN TURTLEFACTS ----------- TURTLEFACTS Outputs a list that contains: Turtle's x coordinate; Turtle's y coordinate; Turtle's heading; Penstate; Pen's color number; TRUE if the turtle is visible, FALSE if not. ?TURTLEFACTS [15 30 60 PE 3 FALSE] TURTLETEXT ---------- TURTLETEXT object (...) Displays the input object(s) on the graphic viewport at the character position closest to the turtle's position using the current pen color and state. TURTLETEXT removes the outer brackets from any input list and does not move the turtle. ?TURTLETEXT "HOME FORWARD 10 UPPERCASE --------- UPPERCASE word Outputs the input word with all alphabetic characters in uppercase. ?UPPERCASE "Shawn SHAWN .COLOROFF --------- .COLOROFF Turns off the color burst signal when in medium resolution (SETRES 1). ?.COLOROFF .COLORON -------- .COLORON Turns on the color burst signal when in medium resolution (SETRES 1). ?.COLORON .CONTENTS --------- .CONTENTS Displays the contents of the Dr. Logo symbol space. ?.CONTENTS .DEPOSIT -------- .DEPOSIT n n Puts the second input number into the memory location specified by the first input number. This location is relative to the absolute location established by .SETSEG. THIS PRIMITIVE SHOULD BE USED WITH CAUTION! ?.DEPOSIT 22 7 .EXAMINE -------- .EXAMINE n Displays the contents (a byte value) of the memory location specified by the input number. This location is relative to the absolute location established by .SETSEG. ?.EXAMINE 22 0 .IN --- .IN port_n Displays the contents (a byte value) of the specified port. Port numbers range from 0 through 65535. ?.IN 397 50 .OUT ---- .OUT port_n n Assigns the input number (a byte value) to the specified port. Port numbers range from 0 through 65535. THIS PRIMITIVE SHOULD BE USED WITH CAUTION! ?.OUT 10 33 .REPLACE -------- .REPLACE item_n varlist object Replaces the specified item of the list with the object. The list MUST be the value of a variable. THIS PRIMITIVE SHOULD BE USED WITH CAUTION! ?MAKE "VARLIST [A B C D E F] ?.REPLACE 4 :VARLIST [1 2 3] ?:VARLIST [A B C [1 2 3] E F] .REPTAIL -------- .REPTAIL item_n varlist object Replaces all items following the specified item in the list with the object. The list MUST be the value of a variable. THIS PRIMITIVE SHOULD BE USED WITH CAUTION! ?MAKE "VARLIST [A B C D E F] ?.REPTAIL 4 :VARLIST [1 2 3] ?:VARLIST [A B C D [1 2 3]] .SETSEG ------- .SETSEG segment_n Sets segment value to be used by subsequent .DEPOSIT and .EXAMINE expressions; does not change the segment register. ?.SETSEG 23 xyzzy ----- June 29th 1984 The Wizards: Steve Schmitt Tim Oren Joe Power Gary Kildall SHIP IT!!! EOF