TUTOR

                           System Development Manual





















                                 First Edition
                               Preliminary Draft


                                   July 1984

                              Jeffrey S. Shulman






                    Copyright (C) 1984  Jeffrey S. Shulman
INTRODUCTION                                                                  1


1. Introduction

1.1 Purpose
  TUTOR  is  a  program whose purpose is to introduce the user to Interlisp and
mainly to the Interlisp-D development environment.  TUTOR takes the  programmer
(who is assumed to have minimal Lisp exposure) through:

   - A  short  introduction  to  some aspects of the TUTOR environment and
     program interaction.

   - Keyboard idiosyncrasies, how to use the mouse and what windows are.

   - Menus and interactive window operations.

   - Lisp variables, data types and the Record Package.

   - Basic Lisp and Functions

   - Function definition

   - Function editing

   - The Break package and Data Inspector

   - MAKEFILE

   - The compiler

  all at a fairly basic level.    It  does  this  in  a  light,  cheerful,  and
entertaining manner.  TUTOR is started by the function TUTOR.

1.2 Environment
  Interlisp-D  provides  a rich and complete Lisp development environment which
include things like:

   - A Mouse

   - Multiple Windows

   - Menus

   - Multi-tasking

which TUTOR not only  teaches,  but  takes  full  advantage  of  in  doing  the
teaching.

  The basic TUTOR environment consists of:

   - Prompt  Window  -  This  is  standard  to the Interlisp-D programming
     environment.  TUTOR uses this window at times  when  the  user  would
     normally be interacting with Interlisp-D here.
INTRODUCTION                                                                  2


   - Top  Level  Typescript Window - This is also standard to Interlisp-D.
     This is the main window  the  user  would  use  to  communicate  with
     Interlisp-D  through.  For this reason it is also the main window the
     user interacts with TUTOR through.  TUTOR does most  of  its  talking
     and the user most of his speaking via this window.

   - Tutor  Help  Window  -  This  window  is  used  by  TUTOR  to provide
     additional help to the user at the  users  request.    The  user  can
     request  additional  help  either  by  typing help to any prompt from
     TUTOR or by buttoning the large HELP menu located above this window.

   - Tutor Help Menu - This is a single item menu  (the  item  HELP)  that
     resides  above  the  Tutor Help Window.  At any time the user can get
     additional help printed in the Tutor Help Window  by  buttoning  this
     menu.

   - Tutor  Lesson  Window - This window contains the Table of Contents of
     all lessons available through TUTOR.  The current lesson is shown  by
     inverting  it.    This window can also be used to skip around various
     lessons and review past lessons.

  When TUTOR is first started the above five items are grouped  together  in  a
coherent  fashion  that  keeps the users attention within a certain area of the
screen.  This leaves large empty areas to be used by TUTOR when necessary.

  TUTOR also provides facilities to  suspend  the  tutoring  saving  the  users
current position for resumption at a later date.

  A  standard  user  input  interface is provided which first screens the users
input to see if he needs  further  help  or  wishes  to  suspend  the  tutoring
session.   Help is available at two levels:  If the user types ? to a prompt he
will get a brief sentence printed right in  the  Top  Level  Typescript  Window
explaining what input is requested; if the user types Help (or buttons the HELP
menu)  he  will receive a more detailed explanation of what is requested in the
Tutor Help Window.

  The TUTOR system also protects the user from accidentally  aborting  tutoring
by  disabling  the  normal  interrupt mechanisms.  It reactivates the ERROR and
RESET interrupt but in a protected shell.

  Typing the ERROR interrupt (↑E) at prompt level will cause  the  user  to  be
re-prompted.    Typing it during TUTOR typeout will leave the user at TUTOREXEC
level.  If the user typed it by accident he can resume at the beginning of  the
section he interrupted by typing resume.

  Typing  the RESET interrupt (↑D) will immediately cause the system to go into
a RESET trap.  At this point the user will  be  asked  (in  the  system  Prompt
Window)  whether he really meant to type the RESET interrupt.  If he answers No
then TUTOR will proceeded as if nothing happened.  If he answers Yes then TUTOR
will reset itself leaving the user back at Lisp level.
SYSTEM DESCRIPTION                                                            3


2. System Description
  This  chapter  gives an overview of the TUTOR system; the files it needs, and
the globals and functions it has.  Each global is then listed  along  with  its
purpose.  Following the globals are the functions that make up TUTOR.  Included
are their arguments, returned value and a description of what they do.

2.1 Files
  TUTOR  is  composed  of  the main file, the lesson files and auxiliary files.
The student may also have is own suspended lesson file.  They are described  as
follows:



2.1.1 Main File
  The main file (called TUTOR) contains most all the functions necessary to run
the  TUTOR system.  In addition it contains all the globals, variables, records
and the introductory lesson.  This is the file the user must load to  start  up
the system.



2.1.2 Lesson Files
  Each  full  lesson  is  kept  in  its own separate file.  This file is loaded
automatically when it is needed.  The files are named TUTORLESSONx where  x  is
the  lesson number.  These files do not have to reside in the same place as the
main file.  The variable TUTORLESSONDIRECTORIES is  a  search  list  (like  the
variable   DIRECTORIES  and  LISPUSERSDIRECTORIES)  which  should  contain  the
location of the lesson files.

  TUTORLESSONDIRECTORIES is an INITVAR whose initial value is  ({DSK}  T  NIL).
The  site  administrator  should  set up the appropriate value in the site init
file if different.



2.1.3 Auxiliary files
  Two extra system files and two Lisp User's packages are also necessary to run
the TUTOR system.  There  are  PRINTOUT,  RECORDER,  ACTIVEREGIONS  and  ICONW.
These will be loaded when TUTOR is loaded.  They should be found in DIRECTORIES
(for PRINTOUT) and in LISPUSERSDIRECTORIES (for ACTIVEREGIONS and ICONW.)

  PRINTOUT  contains  functions  that  enhance the capabilities of the printout
package.  RECORDER is a package the lets mouse and keyboard actions  be  played
back.  ACTIVEREGIONS and ICONW are standard Lisp User's packages.



2.1.4 Student File
  When  a  student  suspend's  his  lesson  a  file  is created to hold what is
necessary  to   resume   where   he   left   off.      This   file   is   named
TUTOR-username.firstname.   username is the students user name and firstname is
his  first  name.    This  file  is  kept  in  the   directory   described   by
SYSTEM DESCRIPTION                                                            4


TUTORSTUDENTDIRECTORY.

  TUTORSTUDENTDIRECTORY  is  an INITVAR whose initial value is {DSK}.  The site
administrator should set up the appropriate value in  the  site  init  file  if
different.     This  variable  can  be  set  to  anything  a  single  entry  of
USERGREETFILES can be set to and will behave appropriately.

2.2 Organization
  TUTOR is organized around the concept of a lesson.  Each  main  topic  is  an
entire  lesson.   These lessons are further broken up into sections.  A section
is the smallest unit the user can repeat or  suspend  a  tutoring  session  at.
Except  for  the  introductory  lesson  each lesson is kept in its own separate
file.  Each file is loaded as necessary by the system automatically.

  Sections are implemented by separate Lisp functions.  The convention used  in
naming  these  functions  is  Llesson#.section#.  For example the function that
implements lesson 2, section 4 would be called L2.4.



2.2.1 Lesson Scheduling
  Section scheduling is handled  by  the  TUTOREXEC  rather  then  having  each
section chain to the next.  TUTOREXEC provides the protected Lisp executive for
the  entire  system.    It  handles section scheduling by evaluating the global
variable *NEXT*  which  should  contain  the  function  implementing  the  next
section.  Each section is responsible for setting the next section by a call to
the  function  NEXT.LESSON  which  maintains the Tutor Lesson Window, loads the
lesson file if necessary, and sets *NEXT* appropriately.



2.2.2 Standard Output
  The macro MESSAGE provides the standard output  interface  for  each  section
function.    This  macro  is used somewhat like the Interlisp printout facility
(which it does indeed compile into) to provide both the general TUTOR  dialogue
as  well as the help messages printed in the Tutor Help Window.  In addition to
excepting printout forms it handles bitmaps and strings.

  Bitmaps are handled by the .BM printout command  which  is  among  the  extra
features added by loading PRINTOUT.

  Strings are translated into lists which are used for the printout form .PARA.



2.2.3 Standard Input
  The standard input function to receive any input from the user is USER.INPUT.
This  function  provides  a  protected interface to PROMPTFORWORD to trap ERROR
interrupts.  This function also recognizes special  user  input  for  help  and
tutorial suspension separate from the requested input.
SYSTEM DESCRIPTION                                                            5


2.3 Globals



2.3.1 System globals


2.3.1.1 TUTORLESSONDIRECTORIES
  This  variable  contains  the list of directories to be searched for a lesson
file.    It  corresponds   to   the   Interlisp   variables   DIRECTORIES   and
LISPUSERSDIRECTORIES.  It is an INITVAR whose initial value is ({DSK} T NIL).


2.3.1.2 TUTORSTUDENTDIRECTORY
  The value of this variable is used to construct the full file name of where a
student's  suspend'ed  file is kept.  Its value can be an atomic HOST/DIRECTORY
or a list that is PACK'ed to form an atomic HOST/DIRECTORY (with this form  the
atom  USER  will  have the student's user name substituted before PACKing.)  It
corresponds to a single entry in the Interlisp variable USERGREETFILES.  It  is
an INITVAR whose initial value is {DSK}.


2.3.1.3 *KEYBOARD.WINDOW*
  Window used to display the keyboard layout in.


2.3.1.4 *LESSON.NAMES*
  An alist of lesson numbers and titles.  Used in the Tutor Lesson Window


2.3.1.5 *LESSON.WINDOW*
  This  is  the  window  that  contains  the  Table  of Contents of the lessons
available in TUTOR.  The window property LESSON is the number  of  the  current
TUTOR lesson.


2.3.1.6 *MAIN.WINDOW.REGION*
  This is the region the main tty window is reshaped to by TUTOR.INIT.


2.3.1.7 *NEXT*
  If  non-NIL  evaluated  by TUTOREXEC when it gains control.  Used to schedule
the next lesson section.  Set by the function NEXT.LESSON.


2.3.1.8 *PROMPT.REGION*
  This is the region the prompt window is reshaped to by TUTOR.INIT.
SYSTEM DESCRIPTION                                                            6


2.3.1.9 *TUTOR.HELP.MESSAGE*
  Contains  the  printout  expansion  for the current help message.  Set by the
MESSAGE macro and used by the function TUTOR.HELP.


2.3.1.10 *TUTOR.HELP.WINDOW*
  The Tutor Help Window.



2.3.2 Reference Pages


2.3.2.1 *PP.INTERRUPT-CHARACTERS*
  Page that describes the interrupt characters.


2.3.2.2 *PP.MENUS*
  Starting page for description of menus.



2.3.3 Bitmaps

2B.MOUSE        Two button mouse. 9 by 16.

3B.MOUSE        Three button mouse. 12 by 16.

DLIONKBD        Dandelion keyboard icon. 72 by 72.

DOLPHINKBD      Dolphin keyboard icon. 72 by 72.

DORADOKBD       Dorado keyboard icon. 72 by 72.

DOWN.ARROW      Downward pointing arrow. 10 by 16.

FROWN           Frowning face. 16 by 16.

IS.OPR.BM.1     Smiling I.S. Opr. 83 by 92.

IS.OPR.BM.2     Normal I.S. Opr. 83 by 92.

IS.OPR.BM.3     Left I.S. Opr twirler. 83 by 92.

IS.OPR.BM.4     I.S. Opr beanie.  83 by 92.

IS.OPR.BM.5     Right I.S. Opr twirler.  83 by 92.

MOUSEBM         Mouse.  16 by 16.

RIGHT.ARROW     Right pointing arrow.  16 by 10.
SYSTEM DESCRIPTION                                                            7


SMALL.GC        Small G.C. Klisp picture.  24 by 24.

SMILE           Smiling face.  16 by 16.

TTYKBDMASK      Mask for keyboard/tty icons.  72 by 72.

UP.ARROW        Upward pointing arrow.  10 by 16.

2.4 Functions



2.4.1 CHARSTRING

Arguments:

                ACTION          An  atomic  key action as returned by KEYACTION
                                or ASCII code.

Value:          String representing how ACTION should be printed.

Description:    Converts ACTION into a text string with appropriate "↑" and "#"
                added if necessary.  Returns the common  name  of  any  special
                characters  (e.g.  TAB  for ↑I, etc.).  Returns ACTION if not a
                number or a recognized atomic KEYACTION.



2.4.2 CONTINUE?

Arguments:

                SECTION/LESSONFLG
                                SECTION if a new section is next, LESSON  if  a
                                new lesson is next or NIL if in the middle of a
                                section.  The argument is unevaluated.

                LESSON#         The lesson number.

Value:          NIL

Description:    Asks  the  uses  if he wants to continue.  If it returns to the
                caller then continue (USER.INPUT handles  the  special  cases.)
                If  LESSON#  is  non-NIL then call LOAD.LESSON to load it if we
                are continuing.



2.4.3 DLION.KEYBOARD

Value:          NIL
SYSTEM DESCRIPTION                                                            8


Description:    Draws  and  labels  a  picture  of  the  Dandelion  keyboard in
                *KEYBOARD.WINDOW*.



2.4.4 DOLPHIN.KEYBOARD

Arguments:

                DORADO?         T if we want a Dorado keyboard instead.

Value:          NIL

Description:    Draws and labels a picture of the Dolphin (or Dorado)  keyboard
                in *KEYBOARD.WINDOW*.



2.4.5 GET.USER.NAME

Value:          NIL

Description:    Obtains  the  user;s  first and last name setting FIRSTNAME and
                USERNAME.



2.4.6 LESSON.WINDOW.REPAINTFN

Arguments:

                W               The *LESSON.WINDOW*

                REGION          The region to repaint.  Ignored.

                START           The number of the first lesson to display.

Value:          NIL

Description:    The REPAINTFN for the Tutor Lesson Window.  Titles  the  inside
                of  the  window and prints each item on *LESSON.NAMES* starting
                with START if given.  Then highlights the current lesson  (from
                W's LESSON windowproperty) if within the window.



2.4.7 LESSON.WINDOW.SCROLLFN

Arguments:

                W               The *LESSON.WINDOW*
SYSTEM DESCRIPTION                                                            9


                H               How much to scroll horizontally.  Ignored.

                V               How much to scroll vertically.

                CONTINUOUS?     T if continuous scrolling.

Value:          NIL

Description:    The scroll handler for the lesson window.



2.4.8 LOAD.LESSON

Arguments:

                LESSON#         The number of the lesson to load.

Value:          T

Description:    Checks  to see if the file containing lesson LESSON# is loaded.
                If not load it from TUTORLESSONDIRECTORIES.



2.4.9 NEXT.LESSON

Arguments:

                LESSON          The lesson number.

                SECTION         The section number.

                LOAD?           T to have the file for LESSON loaded.

Value:          NIL

Description:    Takes care of setting up  for  the  next  lesson  and  updating
                *LESSON.WINDOW*.   If LOAD? is T then make sure the lesson file
                is loaded.  Sets *NEXT* to (LLESSON.SECTION).



2.4.10 NO.MORE.LESSONS

Value:          ?

Description:    Called by TUTOREXEC when there are no  more  lessons  to  print
                some final comments.
SYSTEM DESCRIPTION                                                           10


2.4.11 PRINT.KEYACTIONS

Arguments:

                KEYNAME         Internal system KEYACTION keyname.

                REGION          Region to print in.

                FONT            Font  to  print  in.    Either a single font or
                                (lowerfont . upperfont).

                DISPLAYSTREAM   Displaystream to print in.

Value:          NIL

Description:    Prints what KEYNAME does (if anything) in DISPLAYSTREAM in FONT
                centered appropriately  within  REGION.    KEYNAMEs  that  have
                different  shifted  and un-shifted keyactions have each printed
                one above the other with the shifted action on top.



2.4.12 PRINTH

Arguments:

                STRING          String to print.

                REGION          Region to print it in.

                FONT            Font to display in.

                DISPLAYSTREAM   Displaystream to print in.

Value:          NIL

Description:    Prints STRING in DISPLAYSTREAM horizontally centered in  REGION
                in  FONT.  If STRING does not fit in REGION it will keep trying
                the next size down. This function assumes STRING will fit in  a
                font no smaller than 5 pixels.



2.4.13 PRINTV

Arguments:

                STRING          String to print.

                REGION          Region to print it in.

                FONT            Font to display in.
SYSTEM DESCRIPTION                                                           11


                DISPLAYSTREAM   Displaystream to print in.

Value:          NIL

Description:    Prints STRING in DISPLAYSTREAM vertically centered in REGION in
                FONT.  If STRING does not fit in REGION it will keep trying the
                next size down. This function assumes STRING will fit in a font
                no smaller than 5 pixels.



2.4.14 RP.CONTINUE?

Value:          CR

Description:    Acts like CONTINUE? called with  no  arguments  but  will  work
                during  a  RECORDER  playback  (i.e. it tests the instantaneous
                state of the CR key.



2.4.15 SELECT.LESSON

Arguments:

                WINDOW          The *LESSON.WINDOW*.

Value:          NIL

Description:    Used as the BUTTONEVENTFN of *LESSON.WINDOW*.  Allows the  user
                to select a lesson from the Lesson Window.



2.4.16 SETUP.LESSON.WINDOW

Value:          NIL

Description:    Create  *LESSON.WINDOW*  and  call  LESSON.WINDOW.REPAINTFN  to
                display it.



2.4.17 STRING.TO.LIST

Arguments:

                STRING          The string to convert to a list of atoms.

Value:          The converted list.

Description:    Converts a string  to  a  list  cleaning  up  the  string  file
SYSTEM DESCRIPTION                                                           12


                descriptor afterwards.



2.4.18 TUTOR

Value:          NIL

Description:    User   entry   into   the  tutorial  system.    Takes  care  of
                disabling/reimplementing all dangerous interrupts, initializing
                everything, starting TUTOREXEC and cleaning up afterwards.



2.4.19 TUTOR.HELP

Value:          NIL

Description:    Prints  *TUTOR.HELP.MESSAGE*  in   *TUTOR.HELP.WINDOW*.      If
                *TUTOR.HELP.MESSAGE* is NIL informs the user that no extra help
                is currently available.



2.4.20 TUTOR.INIT

Value:          NIL

Description:    Initialize  the  tutorial  system.  It does things like setting
                the correct fontset, shaping/creating the necessary windows and
                menus, and getting startup info from  the  user  (resuming  any
                suspended lessons.)



2.4.21 TUTOR.QUIT

Value:          NIL

Description:    Cleanup  function  when  the use exits TUTOR.  Does things like
                close all the extra windows.



2.4.22 TUTOR.QUIT?

Value:          NIL

Description:    The ↑D interrupt function.  Checks with the user to see  if  he
                really  meant  to reset or not.  If not then just return, if so
                do a  RETFROM  TUTOREXEC  so  that  everything  is  cleaned  up
                properly.
SYSTEM DESCRIPTION                                                           13


2.4.23 TUTOR.RESUME

Value:          T

Description:    Used   to   resume  a  suspended  lesson.    Looks  for  TUTOR-
                username.firstname in the directory TUTORSTUDENTDIRECTORY.   If
                not  found  tells  the  student to select from the Tutor Lesson
                Window.



2.4.24 TUTOR.SUSPEND

Value:          T if something was successfully saved, NIL otherwise.

Description:    Used to suspend the current lesson and save the  users  status.
                Saves     TUTOR-username.firstname     in     the     directory
                TUTORSTUDENTDIRECTORY.    Errors  if   something   goes   wrong
                explaining how to fix.



2.4.25 TUTOREXEC

Arguments:

                LISPXID         The optional LISPXID to use.

Value:          NIL

Description:    The  tutor  executive.   Tailored after USEREXEC but with added
                functionality.  Uses the global *NEXT*  as  input  if  non-NIL.
                Calls  NO.MORE.LESSONS  when  *NEXT*  is  **DONE**.   Evaluates
                input, and if the value  is  not  **FOO**,  prints  the  value.
                Takes  care  of  processing special inputs of QUIT, SUSPEND and
                RESUME.



2.4.26 USER.INPUT

Arguments:

                PROMPT          Prompt string.

                HELP            ? help string

                DEFAULT         Possible default value.

                TERMINATORS     Possible list of terminators.

                WHERE           Where to print output and get input.
SYSTEM DESCRIPTION                                                           14


Value:          The users input as a string.

Description:    Gets  input  from  user  via  PROMPTFORWORD  under  "protected"
                conditions. Also recognizes QUIT,  SUSPEND  and  HELP  separate
                from requested input performing the appropriate actions.



2.4.27 WAIT

Arguments:

                MS              The number of milleseconds to wait.

Value:          ?

Description:    Waits,  in  an  infinate  loop,  for  MS  milleseconds  without
                BLOCKing.  Used mostly during  RECORDER  playbacks  to  suspend
                playback for MS milleseconds.
MACROS                                                                       15


3. Macros



3.0.1 MESSAGE

Arguments:

                THE-MESSAGE     First  item  is one of USER, HELP, or a stream.
                                The following items are in printout form to  be
                                printed  as  an  indented  paragraph  with  the
                                following additions/exceptions: 1) Strings  are
                                changed  into  lists which are passed to .PARA;
                                2) NONE means don't indent  the  paragraph;  3)
                                NOPARA  means don't put an extra CR at the end;
                                and 4) NORMAL,  BOLD  and  ITALIC  mean  switch
                                fonts.

Value:          NIL

Description:    General  purpose  message facility.  The first argument of USER
                means just  print  THE-MESSAGE  in  the  Top  Level  Typescript
                Window;    HELP   means   set   the   compiled   expansion   to
                *TUTOR.HELP.MESSAGE*; a stream means print to that stream.
LESSONS                                                                      16


4. Lessons
  This  chapter  contains  descriptions  of  each  lesson,  descriptions of the
sections they are composed of, support functions and lesson  specific  globals.
Each  full  lesson  (with  the  exception  of Lesson 0), along with the support
functions and  lesson  specific  globals,  is  kept  in  its  own  file  called
TUTORLESSONx where x is the lesson number.

4.1 Lesson 0
  Introduction to the TUTOR system.



4.1.1 Section 0
  Introduce the tutorial, display the keyboard and obtain the users name.
LESSONS                                                                      17


4.2 Lesson 1
  Explain the keyboard, interrupt characters, the mouse and windows.



4.2.1 Section 0
  Explain  the  various  keys on the keyboard; what the CAPS LOCK, and CTRL key
do; ↑E and ↑D interrupts; #A, #B and #C keys.



4.2.2 Section 1
  How to use the mouse and cursor; pointing; cursor "hot spot"; mouse  buttons;
what is the middle mouse button on two button mouse; buttoning.



4.2.3 Section 2
  Windows;  what are they?; the Top level typescript and Prompt windows; window
operations; icons.



4.2.4 Support Functions


4.2.4.1 IS.BFN

Arguments:

                WINDOW          I.S. Opr's window.

Value:          NIL

Description:    Dummy BUTTONFN for I.S. Opr's window.  Each mouse button  press
                removes a piece of the picture.



4.2.5 Globals


4.2.5.1 *COUNT*
  Used by L1.1 to keep track of cursor movement within the I.S. Opr window.

4.3 Lesson 2
  Teach   about   menu's,   getting   mouse   positions/boxregions/regions  and
interactive window operations.
LESSONS                                                                      18


4.3.1 Section 0
  Teach about menus.  Gives examples of both pop-up and standard menus.



4.3.2 Section 1
  Explains positions and box regions.



4.3.3 Section 2
  Explains standard regions.



4.3.4 Support Functions


4.3.4.1 ADFFE.WHENSELECTEDFN

Arguments:

                ITEM            The item selected.

                MENU            The menu.

                BUTTON          The mouse button used.

Value:          NIL

Description:    The WHENSELECTEDFN for Aunt DWIM's Fast Food Emporium of L1.0.


4.3.4.2 CLICK.N.SCORE

Arguments:

                WINDOW          The target window.

                POS             The  mouse position relative to WINDOW.  If NIL
                                uses GETPOSTION to get it.

Value:          The score if within the target, 0 if within the window but  not
                the target, and -1 if totally outside the window.

Description:    Used  to  play the game of Click'N Score in L1.1 or just return
                the score if given POS.
LESSONS                                                                      19


4.3.4.3 DRAWTARGET

Arguments:

                WINDOW          The window to draw a target in.

Value:          NIL

Description:    Draws  a  standard  "Bull's  Eye"  target  in  WINDOW.  Used in
                playing the games Click'N Score and Move'N Win.


4.3.4.4 FAST.FOOD.SEQUENCE

Value:          NIL

Description:    Runs through  the  Aunt  DWIM's  Fast  Food  Emporium  recorder
                sequence FF.SEQUENCE without explaining it.  Used in L1.0.


4.3.4.5 FAST.FOOD.SEQUENCE.EXPLAIN

Value:          NIL

Description:    Runs  through  the  Aunt  DWIM's  Fast  Food  Emporium recorder
                sequence FF.SEQUENCE but explains the  actions  step  by  step.
                Used in L1.0.


4.3.4.6 MAKETARGET

Arguments:

                REGION          The region for the target window.

                TITLE           The title for the target window.

Value:          The target window.

Description:    Creates  a  window at REGION with TITLE and calls DRAWTARGET to
                draw a target inside.


4.3.4.7 MOVE.N.WIN.SEQUENCE.EXPLAIN

Arguments:

                AWINDOW         The window containing the arrow.

                AWINDOW.ORIGIN  The original position of AWINDOW.

Value:          NIL
LESSONS                                                                      20


Description:    Runs    through    the    Move'N    Win    recording   sequence
                MOVE.N.WIN.SEQUENCE with a step by step explaination.  Used  by
                L1.1.


4.3.4.8 MOVE.N.WIN

Arguments:

                TWINDOW         The target window.

                AWINDOW         The arrow window.

Value:          The  score  obtained  by  calling  CLICK.N.SCORE with the arrow
                point as the position.

Description:    Plays the game of Move'N Win.



4.3.5 Globals


4.3.5.1 FF.SEQUENCE
  The recording for GC ordering in Aunt DWIM's Fast Food Emporium.


4.3.5.2 CLICK.N.SCORE.SEQUENCE
  The recording used by GC when playing Click'N Score.


4.3.5.3 MOVE.N.WIN.SEQUENCE
  The recording used by GC when playing Move'N Win.


4.3.5.4 Bitmaps

AUNT.DWIM.BM    Aunt DWIM's picture.  24 by 24.

MNW.ARROW       Arrow used in playing the game Move'N Win.  30 by 7.
TABLE OF CONTENTS                                                             I


                               Table of Contents

1. Introduction                                                               1

1.1 Purpose                                                                   1
1.2 Environment                                                               1

2. System Description                                                         3

2.1 Files                                                                     3
     2.1.1 Main File                                                          3
     2.1.2 Lesson Files                                                       3
     2.1.3 Auxiliary files                                                    3
     2.1.4 Student File                                                       3
2.2 Organization                                                              4
     2.2.1 Lesson Scheduling                                                  4
     2.2.2 Standard Output                                                    4
     2.2.3 Standard Input                                                     4
2.3 Globals                                                                   5
     2.3.1 System globals                                                     5
          2.3.1.1 TUTORLESSONDIRECTORIES                                      5
          2.3.1.2 TUTORSTUDENTDIRECTORY                                       5
          2.3.1.3 *KEYBOARD.WINDOW*                                           5
          2.3.1.4 *LESSON.NAMES*                                              5
          2.3.1.5 *LESSON.WINDOW*                                             5
          2.3.1.6 *MAIN.WINDOW.REGION*                                        5
          2.3.1.7 *NEXT*                                                      5
          2.3.1.8 *PROMPT.REGION*                                             5
          2.3.1.9 *TUTOR.HELP.MESSAGE*                                        6
          2.3.1.10 *TUTOR.HELP.WINDOW*                                        6
     2.3.2 Reference Pages                                                    6
          2.3.2.1 *PP.INTERRUPT-CHARACTERS*                                   6
          2.3.2.2 *PP.MENUS*                                                  6
     2.3.3 Bitmaps                                                            6
2.4 Functions                                                                 7
     2.4.1 CHARSTRING                                                         7
     2.4.2 CONTINUE?                                                          7
     2.4.3 DLION.KEYBOARD                                                     7
     2.4.4 DOLPHIN.KEYBOARD                                                   8
     2.4.5 GET.USER.NAME                                                      8
     2.4.6 LESSON.WINDOW.REPAINTFN                                            8
     2.4.7 LESSON.WINDOW.SCROLLFN                                             8
     2.4.8 LOAD.LESSON                                                        9
     2.4.9 NEXT.LESSON                                                        9
     2.4.10 NO.MORE.LESSONS                                                   9
     2.4.11 PRINT.KEYACTIONS                                                 10
     2.4.12 PRINTH                                                           10
     2.4.13 PRINTV                                                           10
     2.4.14 RP.CONTINUE?                                                     11
     2.4.15 SELECT.LESSON                                                    11
     2.4.16 SETUP.LESSON.WINDOW                                              11
     2.4.17 STRING.TO.LIST                                                   11
TABLE OF CONTENTS                                                            II


     2.4.18 TUTOR                                                            12
     2.4.19 TUTOR.HELP                                                       12
     2.4.20 TUTOR.INIT                                                       12
     2.4.21 TUTOR.QUIT                                                       12
     2.4.22 TUTOR.QUIT?                                                      12
     2.4.23 TUTOR.RESUME                                                     13
     2.4.24 TUTOR.SUSPEND                                                    13
     2.4.25 TUTOREXEC                                                        13
     2.4.26 USER.INPUT                                                       13
     2.4.27 WAIT                                                             14

3. Macros                                                                    15

     3.0.1 MESSAGE                                                           15

4. Lessons                                                                   16

4.1 Lesson 0                                                                 16
     4.1.1 Section 0                                                         16
4.2 Lesson 1                                                                 17
     4.2.1 Section 0                                                         17
     4.2.2 Section 1                                                         17
     4.2.3 Section 2                                                         17
     4.2.4 Support Functions                                                 17
          4.2.4.1 IS.BFN                                                     17
     4.2.5 Globals                                                           17
          4.2.5.1 *COUNT*                                                    17
4.3 Lesson 2                                                                 17
     4.3.1 Section 0                                                         18
     4.3.2 Section 1                                                         18
     4.3.3 Section 2                                                         18
     4.3.4 Support Functions                                                 18
          4.3.4.1 ADFFE.WHENSELECTEDFN                                       18
          4.3.4.2 CLICK.N.SCORE                                              18
          4.3.4.3 DRAWTARGET                                                 19
          4.3.4.4 FAST.FOOD.SEQUENCE                                         19
          4.3.4.5 FAST.FOOD.SEQUENCE.EXPLAIN                                 19
          4.3.4.6 MAKETARGET                                                 19
          4.3.4.7 MOVE.N.WIN.SEQUENCE.EXPLAIN                                19
          4.3.4.8 MOVE.N.WIN                                                 20
     4.3.5 Globals                                                           20
          4.3.5.1 FF.SEQUENCE                                                20
          4.3.5.2 CLICK.N.SCORE.SEQUENCE                                     20
          4.3.5.3 MOVE.N.WIN.SEQUENCE                                        20
          4.3.5.4 Bitmaps                                                    20