BFOIT - Introduction to Computer Programming

Appendix B (Directives)

TG Programming Environment Directives

Certain commands entered in the CommandCenter window help with the program development process.  These commands are not part of the jLogo language = they can't be included in procedures you define.  Examples of directives: there is a directive which prints the title lines of all of the procedures you've defined; there is a directive which prints a textual representation of a procedure you specify.  In summary, directives help you write and debug programs.

Program Management (Directives)
Name Input(s) Description Example
[Ctrl]-T   While in the CommandCenter, holding down the [Ctrl] key and pressing the "T" key will print the name of the current turtle and the state of all turtles.  
[Ctrl]-Q   While in the CommandCenter, holding down the [Ctrl] key and pressing the "Q" key will stop program execution - think of Ctrl-Q as a QUIT directive.  
CT
CLEARTEXT
  Erases all of the text in the CommandCenter. CLEARTEXT
 NEWTURTLE  name Creates a new turtle with the specified name. NEWTURTLE "t2
PRINTPROCS
PP
  Displays the names and inputs of all procedures that have been defined in the current session in the CommandCenter. PRINTPROCS
PRINTTEXT
PT
name Displays the source code representation of the procedure named name in the CommandCenter. PRINTTEXT main
 TALKTO name Directs future CommandCenter input to the specified turtle, i.e., makes name the current turtle. TALKTO "t2
TRACE procName
varName
Directs TG to display information every time a specified user-defined procedure is invoked or a specified global variable's value is changed. TRACE keyPressed
TRACE curNum
UNTRACE name Cancels the TRACE request for the named procedure or global variable. UNTRACE keyPressed
UNTRACE curNum


Back to Jargon
Go to the Table of Contents
On to jLogo Primitives