MicroWorlds Vocabulary*
Name Syntax Description Examples
/ (division sign) number1 / number2 Reports the result of number1 divided by number2. See quotient. show 3 / 3
1
* (multiplication sign) number1 * number2 Reports the product of number1 multiplied by number2. See product. show 3 * 3
9
- (minus sign) number1 - number2 Reports the result of number1 minus number2. See difference. show 3 - 3
0
+ (addition sign) number1 + number2 Reports the sum of number1 and number2. See sum. show 3 + 3
6
< (less than sign) number1 < number2 Reports true if number1 is less than number2. See less?. show 2.9 < 3
true
= (equals sign) word-or-list1 = word-or-list2 Reports true if word-or-list1 is equal to word-or-list2. See equal? and identical?. show 3 = 3
true
> (greater than sign) number1 > number2 Reports true if number1 is greater than number2. See greater?. show 3.1 > 3
true
show 5 > 6
false
abs abs number Stands for absolute. Reports the absolute value of its input. abs 5
abs -3
abs slider1
and and true-or-false1 true-or-false2
( and true-or-false1 true-or-false2 true-or-false3... )
Reports true if all its inputs report true. If more than two inputs are used, and and its inputs must be enclosed in parentheses. See or and not. and 1 = 1 3 < 4
(and 1 = 1 3 < 4 2 > 1)
announce announce word-or-list Displays the message in an alert box. Clicking OK closes the box. If you drag the alert box to a new position while it is being displayed, this is the position where the next alert box is opened in the project. See question and answer. announce "welcome
announce [Hi there]
announce text1
answer answer Reports the contents of the last answer typed in the question dialog box. Using question and answer, you can pick up the words typed at the keyboard to create an interactive program. if answer = "yes [setsh "happy]
if answer = "no [setsh "sad]
arctan arctan number Stands for arc tangent. Reports the arc tangent (the inverse function of the tangent) of its input. See tan and cos. arctan 1
arctan slider1
ascii ascii char Stands for American Standard Code for Information Interchange. Reports the ASCII number which represents the character. See char. ascii "a
ask ask who instruction-list Temporarily tells each element in the first input to run the instruction list. The first input can be the name(s) of one or many turtles or text box names. Ask does not change the current turtle or text box. The apostrophe can be used to ask a turtle to report something. Turtles have built-in state variables: pos, heading, color, size, pensize, and shape. New state variables can be assigned to turtles using turtlesown. ask "t1 [cg]
ask [t1 t2] [fd 50]
ask [text1 text2] [ct]
ask "t1 [pos]
ask "text1 [selected]
bf (butfirst) bf (butfirst) word-or-list Reports all but the first component of a word or list. See butlast, first, and last. bf "welcome
bf [one two three]
bf text1
bg bg Stands for background. Reports a number representing the color of the background. The background color is 0 (white) when MicroWorlds starts up. See setbg. bg
bk (back) bk (back) number Moves the turtle backwards. See forward. bk 50 (back 50 tiny steps)
bk slider1
bl (butlast) bl (butlast) word-or-list Reports all but the last component of a word or list. See butfirst, first, and last. bl "goodbye
bl [one two three]
bl text1
bottom bottom Puts the cursor (insertion point), in the current text box, at the end of the text. Try using this command in a button so that you can see the effect on the cursor. See top, sol, eol, and eot?. bottom
cancel cancel instruction-list Stops the process given as input. The process must have been launched using launch, when, forever, buttons, or clickable turtles. The input must be the exact same instruction list that started the process. cancel [fd 5 wait 1]
carefully carefully word-or-list-to-run1 word-or-list-to-run2 Runs the first input, a word or list of instructions. If the first input contains an error, carefully runs the second input, a word or list of instructions and sets errormessage to the error that occurred. If there is no error in the first input, the second input is ignored. Since errors caught by carefully will not be accessible by the Help menu item, Last Message, use this command with caution. carefully "ct "clean
carefully [fd 50] [announce [No turtle!]]
cb cb Stands for cursor back. Moves the cursor (insertion point), in the current text box, to the previous character. Try using this command in a button so that you can see the effect on the cursor. See cf, cd, and cu. cb
cc cc Stands for clear the Command Center. Clears the text in the Command Center. cc
cd cd Stands for cursor down. Moves the cursor (insertion point), in the current text box, to the next physical line. Try using this command in a button so that you can see the effect on the cursor. See cu, cf, and cb. cd
cf cf Stands for cursor forward. Moves the cursor (insertion point), in the current text box, to the next character. Try using this command in a button so that you can see the effect on the cursor. See cb, cd, and cu. cf
cg cg Stands for clear graphics. Clears the graphics on the page and returns the current turtle to its home position, facing up. See clean and freezebg. cg
char char number Stands for character. Reports the character represented by the ASCII number given as input. The number must be between 32 and 255. An exception is char 9, the tab character. See ascii and print.  
chdir chdir path Stands for change directory. Changes the current drive and/or subdirectory name to path. To return to the desktop, use the volume name alone as input to chdir. See currentdir and directories. chdir "Media
chdir "|C:\MicroWorlds\My Work|
clean clean Clears the graphics without changing any turtle's position. See cg and freezebg. clean
clearname clearname word Clears a global variable from memory. See clearnames, names, make, and name. make "speed 5
make "direction "right
show :speed
5

clearname "speed
show :speed
speed has no value
clearnames clearnames Clears all the global variables from memory. MicroWorlds doesn't clear the variables when you open or create a new project. Therefore, it may be necessary to use clearnames when you start a new project. See names, clearname, make, and name. make "speed 5
make "direction "right
show :speed
5

clearnames
show :speed
speed has no value

show :direction
direction has no value
clickoff clickoff Simulates a mouse click on the current turtle, turning it off if it was on. This command will only have an effect if the turtle is programmed to react to a mouse click. See clickon, listen. clickoff
clickon clickon Simulates a mouse click on the current turtle, turning it on if it was off. This command will have an effect if the turtle is programmed to react to a mouse click. See clickoff and listen. clickon
clipboard clipboard Reports the contents of the text Clipboard. The Clipboard contains the last text that has been cut or copied using the cut or copy command, or the equivalent Edit menu items. The Clear menu item and the Delete key do not affect the Clipboard. See also select and paste.  
closeworksheet closeworksheet Closes and saves the current Microsoft Excel file. This is the Excel file that was opened with the command openworksheet. See getcell and setcell. The Excel related primitives will only work if you have this program available. openworksheet "graph "sheet1
setcell 1 2 10
closeworksheet
color color Reports the turtle's color as a number. Color reports a number, even if a name was used as input for setc.  
colorunder colorunder Reports the color under the current turtle as a number. The portion of a turtle that recognizes a color is its center. Colorunder reports the background color as well as all the drawings.  
copy copy Puts a copy of the selected text in the Clipboard. It unselects the current selection. See cut, paste, and select. copy
cos cos number Stands for cosine. Reports the cosine of its input. See sin and tan. cos 60
cos slider1
count count word-or-list Reports the number of components in the word or the list. See item and textcount. count "hello
count [this is a list]
count text1
createprojectvar createprojectvar word-or-list Stands for create project variable. Creates a project variable represented by a command and a reporter. For example, if the project variable "amount" is created, the command setamount sets its value, and amount reports its value. Project variables are saved with your project. You can also use the remove command to remove a project variable. See projectvars, make, remove and name. createprojectvar "amount
setamount 22
show amount
22
createprojectvar [friends foes]
ct (cleartext) ct (cleartext) Clears the text in the current text box. ct
cu cu Stands for cursor up. Moves the cursor (insertion point), in the current text box, to the previous physical line. Try using this command in a button so that you can see the effect on the cursor. See cd, cb, and cf. cu
currentdir currentdir Stands for current directory. Reports the current directory that was set. See chdir. show currentdir
C:\MicroWorlds\projects
cut cut Deletes the text selection in the current text box and puts a copy in the Clipboard. See select, copy and paste. cut
delete delete Deletes the character to the right of the insertion point, in the current text box. delete
difference difference number1 number2 Reports the result of subtracting number2 from number1. See minus sign and minus. difference 7 3
difference slider1 slider2
directories directories Reports a list of subdirectory names. To change directories through a command, use chdir.  
distance distance turtle-name Reports the distance between the current turtle and the turtle indicated. See towards. distance "t2
dolist dolist range instruction-list Runs the instruction list for each item in a list. The first input, range, is a list with a temporary variable name and a list of items. The second input is a list of instructions that uses the variable name included in the first input. See dotimes. dolist [i [a b c d]] [show :i]
done? done? instruction-list Reports true if the process indicated is completed. The process must have been launched using launch or forever. The input must be an exact copy of the instruction list that started the process. Done? can be used as an input to waituntil in order to synchronize events. done? [melody1]
dotimes dotimes range instruction-list Runs the instruction list for each value specified in the range. The first input is a list with a temporary variable name and a maximum number. The second input is a list of instructions that uses the variable name included in the first input. See dolist. dotimes [i 8][show :i]
empty? empty? word-or-list Reports true if the input is an empty word or empty list. empty? "hello
empty? [ ]
empty? text1
eol eol Stands for end of line. Brings the cursor (insertion point), in the current text box, to the end of the current logical line. Try using this command in a button so that you can see the effect on the cursor. See sol. eol
eot? eot? Stands for end of text. Reports true if the cursor (insertion point), in the current text box, is at the end of the text. See bottom. Eot? is generally used to stop a procedure that processes information in a text box using cursor (insertion point) commands like cd, eol, etc. if eot? [stop]
equal? equal? word-or-list1 word-or-list2 Reports true if the two inputs are equal. The inputs may be words, numbers, or lists. See identical? and equals sign. equal? "a "A
equal? 5 7
equal? [yes] text1
erfile erfile path Stands for erase file. Erases any type of file if it is not locked. The input must be the name of a file in the current directory or a full path. erfile "farm
erfile "C:\projects\farm

When there is more than one file with the same name, you need to add the extension.
erfile "quake.mw2

If one of the elements of the path has spaces, vertical bars must enclose the whole path:
erfile "|C:\My projects\farm|
errormessage errormessage Reports the last error message trapped by carefully. If errormessage reports an empty word, it means that the last operation using carefully did not report an error.  
everyone everyone list-of-instructions Makes all the turtles on the current page run the instruction, one after the other. See ask and talkto. everyone [clickon]
exp exp number Stands for exponential. Reports the number to the power of the constant e. exp 1
exp slider
exporttext exporttext path text-name Exports the text found in text-name to the file named in path in a text file format.

The second input, text-name, must be a text box name or the special word CC (to export the text in the Command Center) or Procedures (to export the text in the Procedures Tab area).
exporttext "story.rtf "text1
exporttext "C:\proj\storyproc "procedures
exporttext "story "cc
fd (forward) fd (forward) number Moves the turtle forward. See back. fd 50 (forward 50 tiny steps)
fd slider1
files files filetype Outputs a list of files of the given filetype. show files "TXT
fill fill Fills a closed shape or the whole screen with the turtle's color. Fill will work regardless of the turtle's pen state (up or down). See setc. fill
first first word-or-list Reports the first component of the word or list. See butfirst, butlast, and last. first "hello
first [one two]
first text1
fontsize fontsize Reports the font size used at the insertion point in the current text box. If text that has more than one font size is selected, fontsize reports the first one. fontsize
forever forever word-or-list-to-run Runs the input repeatedly as an independent parallel process. Use cancel, Stop All, or Ctrl+Break to stop the process. See launch. forever [fd 1 rt 1]
found? found? Reports true if the last search instruction was successful.  
fput fput word-or-list list Stands for first put. Reports the list created by adding the first input at the beginning of the second input. The second input has to be a list. See lput. fput "a [a b c d]
fput [hi] [there]
fput text1 [a b c]
freeze freeze word-or-list
freeze page-name
Freezes objects so that they cannot be moved, resized, or removed with the mouse. The input is the name of an object on the page, or a list containing many names. A page name can also be used as input to freeze all the elements contained in that page. Unfreeze undoes the effect of freeze. freeze "t1
freeze [text2 text3]
freeze "page1
freezebg freezebg Stands for freeze back ground. Freezes the background graphics in their current state. You can still draw over the background and erase the new drawings, but the original background (before freezing) won't be erased. When you click on the page icon in the Project Tab area, a message appears in the Status bar if the background is frozen. See unfreezebg. freezebg
get get object property Reports a property of an object in the current project. The first input is the name of an object, a color, or a page. The second input is a property name. show get "t1 "on?
true
show get "text1 "size
160 100
getcell getcell row column Reports the value of the cell specified by the row and column of the current Microsoft Excel worksheet. Note that the command openworksheet will make an Excel worksheet available to MicroWorlds. See also setcell and closeworksheet. setpensize getcell 1 1
pd fd getcell 1 2
getpage getpage page-name Displays the page. The input must be the name of a page in the current project. Typing the page name alone has the same effect. getpage "page2
getproject getproject path Gets the project indicated (the current project is not saved). The input must be the name of a project in the current directory or a full or relative path to access another directory. See saveproject. getproject "sunset
getproject "|My Project|
getproject "C:\projects\scene
glide glide distance speed Makes the turtle glide over the distance indicated. The second input tells how fast the turtle will glide. The maximum distance and maximum speed for glide are 9999 and 99, respectively.

(On newer computers, even the slowest gliding speed of 1 is too fast for a reasonable gliding speed.)
glide 100 1
glide 200 slider1
greater? greater? number1 number2 Reports true if the first input is greater than the second input. See less? and greater than sign. greater? 4 3
greater? slider1 slider2
heading heading Reports the current turtle's heading in degrees. The degrees correspond to those of a compass; 0 degrees is due North, 90 is East, 180 is South, and 270 is West. See seth.  
hidetext hidetext Hides the current text box. You cannot type in a hidden text box, but primitives such as print, insert, and cleartext still work. See showtext. hidetext
home home Moves the turtle to the center of the page coordinates [0 0], pointing up. home
ht ht Stands for hide turtle. Hides the current turtle. See st. ht
identical? identical? word-or-list1 word-or-list2 Reports true if both inputs are identical. A word and a list containing the same word are not identical. Corresponding characters of each input must match in terms of uppercase and lowercase letters. (Style, font, and text color are ignored.) See equal?. identical? "a "A
identical? "hello [hello]
identical? [a b c] text1
if if true-or-false list-to-run Runs the instruction list only if the condition (first input) reports true. See ifelse. if 5 > 2 [announce "right]
ifelse ifelse true-or-false instruction-list1 instruction-list2 Runs the first instruction list if the condition is true. Runs the second instruction list if the condition is false. See if. ifelse colorunder = 15 [fd 50] [ bk 50]
ifelse xcor > 0 [14] [104]
importtext importtext path text-name Imports the text from the named file (path) into the text box, Procedures Tab area, or Command Center, named by text-name. The input for text-name must be the name of a text box or the special words CC (for Command Center) or Procedures (for Procedures Tab area). The input for path must be the name of a text file in the current directory or a full or relative path. importtext "story "text1
importtext "c:\prjs\myprcs "procedures
importtext "media\quake "cc
infront infront Brings the current turtle in front of all the other turtles on the page. Creating a new turtle with the newturtle command has the same effect. infront
insert insert word-or-list Prints the input at the cursor position, in the current text box. See print. insert "hello
insert [ hi there]
insert text1
int int number Stands for integer. Reports the integer portion of its input. See round. int 10
int 9.9
item item number word-or-list Reports the specified element of a word or a list. The first input must be between 1 and the number of elements in the word or the list. item 2 "house
item 3 [a b c]
item slider1 text1
key? key? Reports true if a key is being pressed on the keyboard. Use stopall to reset key? to false. See readchar.  
last last word-or-list Reports the last component of the word or list. See first and butlast. last "hello
last [a b c]
last text1
launch launch word-or-list-to-run Runs the input as an independent parallel process. If the process is launched from the Command Center, the cursor reappears immediately. Use cancel, Stop All, or Ctrl+Break to stop the process. See forever. launch "melody1
launch [glide 1000 1]
launch text1
less? less? number1 number2 Reports true if the first number is less than the second number. See greater? and less than sign. less? 2 5
less? slider1 slider2
let let list-of-names-and-values Creates one or many temporary variables. The variables will exist only while the procedure containing the let instruction and procedures called by this procedure are running. The input is a list of paired variable names and values. Let can only be used in a procedure. See local. let [dist 100]
let [head 90 delay 60]
list list word-or-list1 word-or-list2
( list word-or-list1 word-or-list2 word-or-list3... )
Reports one list made by combining the inputs (words or lists). If more than two inputs are used (or only one input), list and its inputs must be enclosed in parentheses. List maintains the structure of its input elements. See sentence. show list 2 3
2 3

show (list "a "b "c "d)
a b c d
list? list? word-or-list Reports true if the input is a list. See word?. list? "a
list? [a b c]
list? text1
listen listen Sets the global "turtle who" (the turtle obeying instructions from the Command Center). This command allows you to change the global "turtle who" within a process that has been launched (e.g., from a button). See also talkto and ask. t1, listen
fd 30
ln ln number Stands for natural logarithm. Reports the natural logarithm (the logarithm in base e) of the number. Inverse of exp. See also log. ln 1
ln slider1
loadpict loadpict path Stands for load picture. Loads the picture on the current page. The input must be the name of a picture file that MicroWorlds supports in the current directory or a full or relative path. See savepict. loadpict "scene
loadpict "c:\projects\scene
loadpict "media\sun.jpg
loadshape loadshape path shape-number Loads the specified picture file into that shape. The picture file name will become the name of the shape if there is no other shape with that name in the project. See saveshape. loadshape "ox 20
Loads the ox picture into shape 20. The shape will be named ox.

loadshape "c:\pics\ox.gif 20
loadtext loadtext path Loads the text file in the current text box. The input must be the name of a text file in the current directory or a full or relative path. See savetext, importtext (to import text into the Procedures Tab area). loadtext "story
loadtext "c:\projects\story
loadtext "media\quake-Italy
loadtext "NiceText.rtf
local local word-or-list Makes the specified variable local to the procedure where local is used. Local can only be used in a procedure. See let, make, and name. local "dist
local [dist angle]
log log number Stands for log arithm. Reports the logarithm of the number. See ln and exp. log 100
log slider1
lput lput word-or-list list Stands for last put. Reports the list created by adding the first input at the end of the second. See fput. lput "f [a b c d e]
lput [f] [a b c d e]
lput text1 [a b c d e]
lt (left) lt (left) number Turns the turtle to the left. The maximum value for left is 9999. See right, forward and back. lt 90 (turn left 90 degrees)
lt slider1
make make word word-or-list Creates a variable and gives it the value word-or-list. These variables keep their values as long as you don't clear them or quit MicroWorlds. They are not saved with your project. If you want your variables to have specific values each time the project is loaded, you should have a startup procedure. See name, thing, clearname, names, and createprojectvar. make "sam "cat
make "team [t1 t 2 t3]
make "text text1
member? member? word-or-list1 word-or-list2 Reports true if the first input is a component of the second. Note that a list cannot be a component of a word. member? "a [a b c]
member? [an] [a an and]
member? "a text1
merge merge path word-or-list-of-types Imports pages, procedures, or shapes from another project into the current project. The first input must be the name of a project in the current folder or a full or relative path to access a different folder. This is the project you want to import from.
The second input can be the name of a specific page, a list of page names, the word procedures (to import the procedures and project variables), pages (to import all the pages), or shapes (to replace all the shapes in the source project).
merge "clocks "procedures
Imports the procedures and project variables.
merge "clocks "pages
Imports all the pages.
merge "clocks [page1 page3]
Imports individual pages.
merge "C:\projects\scene "shapes
Replaces all shapes.
minus minus number Reports the additive inverse of its input. Minus must be used to report the additive inverse of a variable (minus :num instead of -:num ). See minus sign and difference. minus 5
minus slider1
mousepos mousepos Stands for mouse position. Reports the page coordinates representing the current mouse position on the screen. See setpos.  
name name word-or-list word Creates a variable and gives it the value word-or-list. These variables keep their values as long as you don't clear them or quit MicroWorlds. They are not saved with your project. See names, clearnames, make, and createprojectvar. name 10 "age
name [Peter Anne Geni] "class
name text1 "Info
name? name? word Reports true if the input is the name of a variable. See make and name. name? "age
names names Reports the names of all the variables with their values.  
newbutton newbutton name [x y] instruction-list Creates a new button with the name and instruction specified, at the position [x y] indicated. The name cannot be more than 32 characters (including spaces). The position [x y] is the top, left corner of the button. The button is created in the Once mode. It will be sized to fit the instruction-list. See set to change the settings of the button. newbutton "button1 [5 60] [clean]
newpage newpage Opens a new page called Pagex (x is the next available number). newpage
newprojectsize newprojectsize list-of-numbers Sets the page size on the computer screen for new projects. The input is a list of two numbers: the width and the height of the page in turtle steps. Before using newprojectsize, there must be an empty project on the screen. See projectsize. Choose New Project from the File menu so there is a perfectly empty project on the screen.
newprojectsize [40 40]
newprojectsize "standard
Resets the project size to the default size.
newslider newslider name [x y] [min max current] Creates a new slider using the specified name at the position indicated. The position [x y] is the top, left corner of the slider. The last input is a list of three numbers representing the minimum, maximum, and current value of the slider. See set to change the slider's settings. newslider "step [100 100] [0 8 3]
show step
3
setstep 5 Sets the slider's value to 5.
setstep [10 20 15] Sets the slider to a minimum 10, a maximum 20, and a current value of 15.
newtext newtext name [x y] [xsize ysize] Creates a new text box using the name and size specified at the position [x y] indicated. The position is the top, left corner of the box. The maximum [xsize ysize] is the size of the page in the project. See set to change the text box's properties. newtext "info [100 100] [50 50]
setinfo [Click on Next]
newturtle newturtle name Creates a new turtle with the name indicated. The new turtle appears at the position [0 0] and is hidden. Use st to make it visible. Newturtle makes the turtle that is created the current turtle. newturtle "sam
not not true-or-false Reports the logical inverse of its input. See and and or. not 1 = slider1
note note number-or-list-of-numbers duration Plays a note using the current instrument. The first input is the MIDI note number and the second is the duration in tenths of a second. If the first input is a list of numbers, note plays a chord. Middle C is 60. The maximum number for note is 127; the maximum duration is 255. There can be no more than 16 numbers in numberlist. note 60 4
note [60 63 67] 15
np (namepage) np (namepage) page-name Names the page being displayed with the input. Namepage corresponds to the Name Page item in the Pages menu. Once the page is named, the page-name is a command that displays that page. np "presentation
number? number? word-or-list Reports true if the input is a number. number? 3.5
number? slider1
number? [fifty]
onreadline onreadline text-box-name instruction Sets the designated text box to the instruction to be run when Enter is pressed. The text box name tag changes to blue to show that an onreadline instruction is active. The second input can be a procedure or a Logo instruction that accepts a number, word or long word (a sequence of characters including spaces) as input. To turn off the effect of onreadline, make the second input an empty word as in: onreadline text-box-name " onreadline "text1 "run
onreadline "text1 "
op (output) op (output) word-or-list Stops the procedure and reports a word or list. Output can only be used in a procedure. op "this
op [ ]
opaque opaque text-box-name Makes the designated text box opaque. This is equivalent to selecting Opaque in the text box's menu upon right-clicking. See transparent. opaque "text1
openworksheet openworksheet path sheet Opens the specified file in Microsoft Excel on the specified worksheet. The first input must be the name of an Excel file in the current directory or a full or relative path. The second input must be the name of the sheet. Note that if Excel hasn't already been open by MicroWorlds, MicroWorlds will open it. See getcell, setcell, and closeworksheet. openworksheet "cards "sheet1
opens an existing worksheet.

openworksheet "mywork "sheet1
opens a new worksheet with the name Mywork.
or or true-or-false1 true-or-false2
( or true-or-false1 true-or-false2 true-or-false3... )
Reports true if any of its inputs report true. If more than two inputs are used, or and its inputs must be enclosed in parentheses. See and and not. or 1 = slider1 slider1 < 4
(or 1 = slider1 slider1 < 4 2 > slider2)
pagelist pagelist Reports a list containing the names of all the pages in the current project. The first name reported by pagelist is always the current page.  
parse parse word Turns character strings into plain lists. Spaces and carriage returns, and linefeed sequences contained in the character string become separators in the list. Parse can be used to turn the long word (a sequence of characters including spaces) reported by text boxes into lists of words. parse "|hello there|
parse text1
paste paste Pastes a copy of the Clipboard in the current text box. The Clipboard contains the last text that has been cut or copied using the cut or copy command, or the equivalent Edit menu items. See also select.  
pd pd Stands for pen down. Puts down the pen of the current turtle. The turtle will then leave a trace when it moves, but not when it is dragged. See pu. repeat 6 [pu fd 10 pd fd 10]
pensize pensize Reports a number representing the pen size of the current turtle. The original pen size is 1. The maximum is 100. See setpensize. setpensize pensize - 20
pi pi Reports the constant pi.  
pick pick word-or-list Reports an element chosen randomly from the word or the list. Picking from a word reports a character, picking from a list reports an element of the list (a word or a list). See textpick. pick "hello
pick [apples oranges grapes]
pictlist pictlist Stands for picture list. Reports a list containing the names of picture files in the current directory. Only the files with picture formats that MicroWorlds supports (created using savepict or other applications) are shown. See textlist, projectlist, and files. show pictlist
mybackground.bmp logo.gif
placepict placepict path position size Stands for place picture. Imports a picture file, places it at the designated position, and adjusts its size to fit the size indicated. The first input is the file name in the current directory or a full or relative path; the second input is the position for the top, left corner of the picture, and the third input is the size of the image on the page, in x and y turtle steps. placepict "balloon [0 0] [100 100]
pos pos Stands for position. Reports the position of the turtle. The result is a list of two numbers. [0 0] is the position at the center of the page. See setpos.  
power power number1 number2 Reports number1 raised to the power of number2. power 3 2
power slider1 3
pr (print) pr (print) word-or-list Prints a word or list in the current text box. The text is followed by a carriage return and line feed sequence. See insert. pr "hello
pr [Welcome back]
pr text1
presentationmode presentationmode Hides the Tabs, Command Center, Toolbar, status bar, and MicroWorlds' menus. The project is centered on the screen and the background is filled in. Presentationmode is used to display completed projects. Use getproject to present a series of projects in presentation mode. To return to MicroWorlds' regular mode, use presentationmode again or press Esc. This command corresponds to the Presentation Mode item in the View menu. presentationmode
procedures procedures Displays the Procedures Tab area. This is equivalent to clicking the Procedures tab.  
product product number1 number2
( product number1 number2 number3... )
Reports the result of multiplying its inputs. If more than two inputs are used, product and its inputs must be enclosed in parentheses. See multiplication sign. product 2 5
(product 2 3 4)
product slider1 slider2
projectlist projectlist Reports a list containing the names of MicroWorlds projects in the directory. See textlist, pictlist, and files. show projectlist
maze myadventure
projectsize projectsize Reports the current project size, in turtle steps. See newprojectsize. show projectsize
744 426
projectvars projectvars Stands for project variables. Reports the list of currently defined project variables. See createprojectvar. show projectvars
amount speed inventory
pu pu Stands for pen up. Lifts up the pen of the current turtle. The turtle will not leave a trace when it moves. See pd. repeat 6 [pu fd 10 pd fd 10]
question question word-or-list Opens a dialog box displaying the question and an area to type the answer. answer reports what was typed in the dialog box. If you write a very long question, only the part that fits will be displayed. question "OK?
question [How are you?]
question text1
quotient quotient number1 number2 Reports the result of dividing number1 by number2. See division sign. quotient 25 5
quotient slider1 slider2
random random number Reports a random non-negative integer (including 0) less than number. The maximum number is 9999. random 2
random slider1
readchar readchar Pauses the execution and waits for a character to be typed on the keyboard. See key? and onreadline.  
recycle recycle Frees up unused Logo memory space. MicroWorlds automatically recycles by itself to free up space. Therefore, only use the recycle command when you do not want the automatic recycle to occur when you a running a program. See space. show space recycle show space
251036 Your results will differ
433004
remainder remainder number1 number2 Reports the remainder after number1 is divided by number2. The remainder of a negative number will be negative. If number1 and number2 are non-integers, they are rounded to the nearest integers. remainder 5 2
remainder -5.2 3
remainder slider1 3
remove remove name Deletes an object, page, project variable created with createprojectvar or a turtle variable created with turtlesown. If the named object is not on the current page, MicroWorlds will look for it on other pages in the project. If the input to remove is procedures, the Procedures Tab area in the current project will be cleared. remove "text1
remove "slider1
repeat repeat number instruction-list Runs the list of instructions the specified number of times. See dotimes and dolist for more advanced features. repeat 360 [fd 1 rt 1]
rerandom rerandom Reproduces the same sequence of numbers generated by random. After running rerandom, random with the same input generates the same sequence of numbers the next time. rerandom
repeat 2 [show random 10]
8
5
rerandom
repeat 2 [show random 10]
8
5
resett resett Stands for reset timer. Resets the timer to 0. The timer starts when you start up MicroWorlds. See timer.  
resetvideo resetvideo word Resets the video to the beginning. resetvideo "Video1
rest rest duration Inserts a rest in a sequence of notes. The duration is in tenths of a second, and has a maximum of 255. See note. rest 5
rest slider1
restore restore Restores the background to the way it was the last time a snapshot command was issued. The turtle's position does not change. Everything else remains intact.  
round round number Reports the number given as input rounded to the nearest integer. Numbers ending with.5 are rounded to the higher integer. round 10.2
round 9.6
rt (right) rt (right) number Turns the turtle to the right. The maximum value for right is 9999. See left, forward and back. rt 90 (turn right 90 degrees)
rt slider1
run run word-or-list-to-run Runs (executes) a word or an instruction list. See onreadline. run "clean
run [fd 50]
run text1
run "pos
run [ascii "A]
savepict savepict path Stands for save picture. Saves the background of the current page as a picture file. savepict "scene
savepict "C:\projects\scene
savepict "scene.jpg
saveproject saveproject Saves the current project without closing it. The project must have a name in order for this command to work. This is equivalent to the Save item in the File menu. Use this primitive if you want to save your project before getting another project with getproject. saveproject
saveshape saveshape path number Saves the specified shape as a picture file. You can also include the full or relative path when you want to save that picture in a directory other than the current one. saveshape "moon 1
saveshape "moon.jpg 1
saveshape "C:\graphics\sun 89
savetext savetext path Saves the text found in the current text box in a text file format. savetext "story
savetext "C:\proj\story
savetext "story.rtf
se (sentence) se (sentence) word-or-list1 word-or-list2
( sentence word-or-list1 word-or-list2 word-or-list3... )
Reports a list which is made up of its inputs (words or lists). Sentence can take more than 2 inputs when sentence and the inputs are enclosed in parentheses. Sentence does not show the brackets of individual lists given as input. See list. se "one [two]
(se "a "big [city])
se text1 text2
search search word Tells MicroWorlds to search and select (highlight) the word in the current text box. Nothing happens if the word is not found. Search starts searching at the insertion point. Use unselect to undo the highlighting effect of search. See also found?. search "a
select select Tells MicroWorlds to start selecting text in the current text box. Any cursor motion (top, bottom, cu, cd, cf, and cb) will select text.  
selected selected Reports as a word a copy of the characters in the block of selected text in the active text box. If no block of characters is selected, the empty word is reported. Use parse to convert the block of characters into a list.  
set set object property value Sets a property for an object to the specified value. The first input is the name of an object. The second input is a property name and the last one is the value. See get. set "text1 "visible? "false
set "t1 "rule [launch [seth random 360 fd 50]]
set "slider1 "showname? "true
set "red "turtlerule [silly-sound]
set "red "mouseclick [announce [You win!]]
set "announce "pos [0 0]
set "page1 "transition 2
setbg setbg name-or-number Stands for set back ground. Sets the background color for the page. The input can be the name of a color or a number. If the input is a name, a quotation mark must precede it. Use setbg 0 or setbg "white to reset the original background color to white. You can't use setbg on a frozen background. See bg, unfreezebg, and loadpict. setbg "red
setbg 15
setc (setcolor) setc (setcolor) name-or-number Sets the color of the turtle's pen. If the turtle has its original shape, it will change color to show the pen color. The input can be the name of a color or a number. If the input is a name, a quotation mark must precede it. The original pen color is black, or color number 9. The input can be an integer, a fraction or a one place decimal. See color. setc "red
setc 15
setcell setcell row column value Sets the value of the specified cell (row, column) in the current Microsoft Excel worksheet. Note that the command openworksheet will make an Excel worksheet available to MicroWorlds. See getcell and closeworksheet. setcell 1 1 50
setcell 1 2 100
setcell 1 2 []
setcell 1 3 "|=AVERAGE(A1:B1)|
setfont setfont word Sets the font for the selected text in the current text box. If no text is selected, setfont sets the cursor to use that font for typing. The input must be the name of a font in your system. See settc, setfontsize, and setstyle. setfont "Arial
setfont "|Times New Roman|
setfontsize setfontsize number Sets the font size for the current text box. If no text is selected, setfontsize sets the cursor to use that font size for typing. The maximum number for font size is 1638. See setfont, settc, and setstyle. setfontsize 10
setfooter setfooter word-or-list Sets the contents of the footer on printouts. Normally, the footer is empty. Use the empty list as input if you do not want any footer after using setfooter. setfooter [Logo Lovers, Grade 4]
setfooter []
seth (setheading) seth (setheading) number Sets the turtle's heading to the specified direction (in degrees). The degrees correspond to those of a compass: 0 degrees is due North, 90 is East, 180 is South, and 270 is West. right and left turn a turtle a number of degrees from its current heading. Seth makes a turtle point to a specific direction, regardless of its previous heading. See heading. seth 90 (Seth -90 points the turtle directly to the left; so does seth 270)
setinstruction setinstruction word-or-instruction-list Sets the instruction for the current turtle. This is equivalent to typing the instructions in the turtle's dialog box. If the list includes the word forever or launch, the instruction's mode is set to Many Times or Once accordingly. If these words are not included, the mode is unchanged. If the turtle is running an instruction when setinstruction is used, the turtle will click off. See set and get. setinstruction [forever [fd 1]]
setinstruction [rt 90]
setinstruction "clean
setinstrument setinstrument name-or-number Sets the instrument for the next note command. There are 7 instrument names: piano, harpsichord, vibraphone, guitar, violin, clarinet, and kalimba. You can also use any number from 1 to 128. setinstrument "piano
setinstrument 9
setpensize setpensize number Sets the turtle's pen size which determines the thickness of the lines it will draw. The pen size can also be set by picking a brush shape and the pencil in the Graphics Tab area and clicking on a turtle. (The pen size is the diameter of the brush.) The original pen size is 1. The maximum pen size is 100. setpensize 10
setpensize slider1
setpos setpos [x y] Stands for set position. Moves the turtle to the designated x y coordinates. The center of the page is [0 0]. Note that if a turtle lands on a programmed color after a setpos command, the color won't react: only forward, back and glide activate programmed colors. See pos. setpos [0 0]
setpos list slider1 slider2
(Use two sliders to set the turtle's x and y coordinates.)
setsh (setshape) setsh (setshape) name-or-number
setsh (setshape) list-of-names-or-numbers
Gives a shape to the turtle. If the input is a name, a quotation mark must precede it. The maximum number for setshape is 128. When a list of shape names or numbers is given as input, each forward and back command makes the turtle cycle through the list of shapes (the maximum number of items in the list is 64). The shape can also be set by picking a shape from the Graphics Tab area and clicking on a turtle. See shape. setsh "star
setsh 5
setsh [lion1 lion2]
setsize setsize number Sets the size of the turtle. The original size is 40 and the maximum and minimum sizes are 160 and 5 respectively. Turtle shapes look nice when they are multiples of 20. You can also change the size of the turtle with the magnifiers. setsize 80
setsize slider1
setstyle setstyle word-or-list Sets the font style in the current text box. The input must be the name of a style (regular, bold, italic, underline). If no text is selected, setstyle sets the cursor to use that style for typing. Multiple styles can be applied by inserting styles in a list. You can also set the text style by choosing Font from the Text menu. See setfont, setfontsize, and settc. setstyle "underline
setstyle [bold italic]
settc settc name-or-number Stands for set text color. Sets the color of the text in the current text box. The input can be the name of a color or a number. If the input is a name, a quotation mark must precede it. The original text color is black, or color number 9. If no text is selected, settc sets the text color for the next characters typed. You can also set the text color by choosing Color from the Text menu. See setfont, setfontsize, and setstyle. settc "red
settc 9
settext settext1 Once a text box is created, the corresponding command combining set and its name is added to MicroWorlds’ vocabulary. settext1 [Some data]
setmytext [Data of mytext textbox]
setx setx number Sets the x coordinate of the current turtle. The y coordinate remains unchanged. setx 100
setx slider1
sety sety number Sets the y coordinate of the current turtle. The x coordinate remains unchanged. sety 100
sety slider1
shape shape Reports the shape name or number, or a list of shape names or numbers of the current turtle. See setshape.  
show show word-or-list Prints a word or a list in the Command Center. The outer level of brackets in a list are not shown. show "hello
hello
show [hello there]
hello there
show text1
showtext showtext Makes the current text box visible. See hidetext. showtext
sin sin number Stands for sine. Reports the sine of number degrees. See cos. sin 90
sin -180
sin slider1
size size Reports the size of the current turtle. See setsize.  
snaparea snaparea shape-number [x y] [xsize ysize] Copies the graphics in the defined area and pastes it in a turtle shape. [x y] is the top, left starting point, and [xsize ysize] determines the size of the rectangle that is copied into the shape. See snapshape. snaparea 1 [-23 39] [50 60]
snapshape snapshape Copies the background behind the turtle into the current shape of the turtle. You cannot use snapshape if the turtle has its original turtle shape. The turtle must be completely visible on the page. Snapshape resets the turtle's size to 40 (its original size) even if the size has been enlarged. If you want to copy the shape into an empty number in the Graphics Tab area, set the turtle to this number before using snapshape. setsh 16
snapshape
snapshot snapshot Takes a snapshot of the background. The next time a restore command is used, the background will be restored to what it was at the moment the snapshot was taken. Note that there is only one snapshot per project, and the snapshot is not saved with the project. snapshot
sol sol Stands for start of line. Brings the cursor (insertion point), in the current text box, to the beginning of the current logical line. Try using this command in a button so that you can see the effect on the cursor. See eol.  
space space Reports the amount of free Logo space in bytes. See recycle. show space recycle show space
251036 Your results will differ
433004
sqrt sqrt number Stands for square root. Reports the square root of its input. sqrt 2
sqrt slider1
st st Stands for show turtle. Shows the current turtle. See ht.  
stamp stamp Stamps a copy of the turtle on the background. The pen does not have to be down to stamp. You can also use the Stamper tool in the Toolbar to stamp the turtle's shape. stamp
stamptext stamptext text-box-name Leaves a copy of the designated transparent text box on the background. This is equivalent to using the Stamper tool on a transparent text box. See transparent. stamptext "text1
startup to startup
...
end
Startup is a special name for a procedure that runs the moment a project is opened. A startup procedure can't have an input. to startup
announce [Welcome to my World!]
end
stop stop Stops the procedure that is running. Stop can only be used in a procedure. See stopall, stopme, and output.  
stopall stopall Stops all running procedures and processes including turtles and buttons. Stopall can be used as a button, from the Command Center, or in a stop rule in a procedure. See stop and stopme.  
stopme stopme Stops the process in which this command was run. Stopme cannot be used to stop a turtle inside a color instruction. In this case, use clickoff instead. See stop and stopall.  
sum sum number1 number2
( sum number1 number2 number3... )
Reports the sum of its inputs. If more than two inputs are used, sum and its inputs must be enclosed in parentheses. See addition sign. sum 5 2
(sum 3 1 4)
sum slider1 4
tan tan number Stands for tangent. Reports the tangent of its input. See sin and cos. tan 45
tan slider1
tc tc Stands for text color. Reports the number of the text color used in the current text box, at the insertion point. If text that has more than one color is selected, tc reports an empty list. See settc.  
textcount textcount text-box-name Reports the number of lines in the named text box. Lines are delimited by carriage returns and line feed sequences (they are logical lines, not physical lines). Empty lines are taken into account. The number that textcount reports is the maximum number that can be used with textitem. See textpick and count. textcount "text1
textitem textitem line-number text-box-name Reports the designated "line" of the named text box. Lines are delimited by carriage returns and line feed sequences (they are logical lines, not physical lines). Empty lines are taken into account. The first input must be between 1 and the number of lines in the text box. The line reported by textitem is a long word (a sequence of characters including spaces). Use parse to turn a long word into a list. See textpick and textcount. textitem 5 "text1
textitem slider1 "text1
textlist textlist Reports a list containing the names of text files in the current directory. Only text type files (extensions TXT or RTF) are shown. See files, projectlist, and pictlist. show textlist
mytext.txt listoffriends.rtf
textpick textpick text-box-name Reports the text in a randomly-chosen line from the named text box. Lines are delimited by carriage returns and line feed sequences (they are logical lines, not physical lines). Textpick can pick empty lines. The line reported by textpick is a long word (a character string including spaces). Use parse to turn a long word into a list. See textitem, textcount. textpick "text1
textwho textwho Reports the name of the current text box. You can change the current text box using the text box name followed by a comma or with talkto.  
thing thing name Reports the value of the named variable. Corresponds to the use of a colon ( : ) preceding a word. See make, name. thing "age
timer timer Reports a number representing the time elapsed since the program started, or since the last resett command was run. The number is in tenths of a second.  
top top Moves the cursor (insertion point) to the beginning of the text in the current text box. Try using this command in a button so that you can see the effect on the cursor. See bottom. print "there! top print "Hello
touching? touching? turtle-name turtle-name Reports true if the two turtles are touching each other; reports false if they are not touching. Touching? always reports false if one of the turtles is invisible. touching? "t1 "t2
towards towards turtle-name Sets the heading of the current turtle to aim towards the turtle whose name is given as input. See distance. towards "t2 (point towards the turtle named t2)
transparent transparent text-box-name Makes the designated text box transparent. This is equivalent to selecting Transparent in the text box's menu upon right-clicking. See opaque and stamptext. transparent "text1
tto (talkto) tto (talkto) turtle-or-list-of-turtles
tto (talkto) text-box
Makes the turtle(s) or text box current. This command has the same effect as typing the name of a turtle or text box followed by a comma. This is the only way of making many turtles do the same thing at the same time. See ask. tto "t1
tto [t1 t2 t3]
tto "text1
turtlesown turtlesown word Assigns a state variable to all the turtles in the current project. This variable can then be set to a specific value for each turtle. This command creates a command-reporter pair of primitives: the word set followed by the name of the variable (e.g., turtlesown "speed creates a setspeed command as in t1, setspeed 12) and the name of the variable (e.g., speed). turtlesown "speed
unfreeze unfreeze word-or-list
unfreeze page-name
Unfreezes the button, text box, turtle, slider, or any object on a page, so they can be changed using the mouse. A page name can also be used as input to unfreeze all the elements contained in that page. See freeze. unfreeze "t1
un freeze [text2 text3]
unfreeze "page1
unfreezebg unfreezebg Stands for unfreeze back ground. Unfreezes the background that was frozen by freezebg. When you click on the page icon in the Project Tab area, a message appears in the Status bar if the background is frozen.  
unselect unselect Undoes the highlighting effect of select or search.  
wait wait number Causes a pause in the execution of a program or instruction. The time is measured in 10ths of a second. wait 2
wait slider1
waituntil waituntil true-or-false-instruction-list Tells MicroWorlds to wait until true-or-false-instruction-list is true before running another instruction. The input must be an instruction list that reports either true or false when it is run. See done?. waituntil [done? [melody1]]
when when true-or-false-instruction-list instruction-list Starts an independent parallel process that repeatedly tests whether the first instruction list reports true or false. If it reports true, the second instruction list is run. To stop a when instruction, use cancel (only on the true-or-false-instruction-list), Stop All, or press Ctrl+Break. when [touching? "t1 "t2] [t2, ht]
who who Reports the name of the current turtle. See ask, listen and talkto. everyone [remove who]
word word word-or-list1 word-or-list2
( word word-or-list1 word-or-list2 word-or-list3... )
Combines its inputs into one word and reports the word. Word can be used to make a list into a word. Word can take one input or more than 2 inputs when word and the inputs are enclosed in parentheses. See list and word?. word "on "ward
word "on [ward]
(word [yes it is])
word? word? word-or-list Reports true if the input is a word. See word and list?. word? "yes
word? [yes or no]
xcor xcor Stands for x coordinate. Reports the x coordinate of the current turtle. See pos, setx, and ycor.  
ycor ycor Stands for y coordinate. Reports the y coordinate of the current turtle. See pos, sety, and xcor.  


* The content of this table is compiled by OpenWorld Learning from separate vocabulary listings in the MicroWorlds help menu (copyright Logo Computer Systems, Inc.), shared here with permission.