home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / educ / extol3.zip / EXTOL.DOC < prev    next >
Text File  |  1988-02-06  |  33KB  |  1,387 lines

  1. $
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.                                     PC-EXTOL
  19.                                   Version 3.1
  20.                                Copyright (c) 1988
  21.  
  22.                                        by
  23.                                Michael C. Taylor
  24.                               129 Country Club Rd.
  25.                               Pine Hill, NJ 08021
  26.  
  27.  
  28.  
  29.  
  30.     Your diskette should contain the following files:
  31.               EXTOL.EXE     - EXTOL PROGRAM
  32.               EXTOLTOC.DOC  - TABLE OF CONTENTS FOR EXTOL.DOC
  33.               EXTOL.DOC     - PC-EXTOL DOCUMENTATION
  34.               GENDER.EXT    - SAMPLE USE OF DRILL COMMAND
  35.               ALICE.EXT     - SAMPLE QUIZ ON ALICE IN WONDERLAND
  36.               BEATLES.EXT   - BEATLES TRIVIA QUIZ
  37.               GRAPH.EXT     - SAMPLE PC-EXTOL GRAPHICS PROGRAM (NEEDS CGA)
  38.               TEXT.EXT      - SAMPLE PC-EXTOL PROGRAM USING "TEXTFILE"
  39.               MENU.EXT      - MENU FOR SAMPLE PROGRAMS
  40.               SCRGRAB.COM   - MEMORY RESIDENT "SCREEN-GRABBER" (SEE SCRGRAB.DOC)
  41.               SCRGRAB.DOC   - DOCUMENTATION FOR ABOVE
  42.               EXTOL.PIC     - File used by GRAPH.EXT
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.                                   Introduction
  71.  
  72.  
  73.         PC-EXTOL is a programming language designed especially for
  74.     Computer-Aided Instruction (CAI) which is particularly well-suited for
  75.     tutorials and instruction in non-mathematical domains.
  76.  
  77.         EXTOL was originally developed at Essex University in England, and
  78.     the PC version is a full implementation of EXTOL along with several
  79.     enhancements.
  80.  
  81.          PC-EXTOL is distributed as shareware.  You are encouraged to
  82.     copy and distribute copies of the program.  You are prohibited from
  83.     altering the program code and documentation in any way.
  84.  
  85.          PC-EXTOL is the result of several years of programming, debugging
  86.     and documenting.  If you find the programs useful, please register
  87.     your copy by sending a contribution ($25 is suggested) to:
  88.  
  89.                               Michael C. Taylor
  90.                              129 Country Club Rd
  91.                              Pine Hill, NJ 08021
  92.  
  93.          In exchange for registering your copy, you will be sent the
  94.     next version of PC-EXTOL free of charge and will be notified of
  95.     any future enhancements by mail.
  96.  
  97.          PC-EXTOL is a very useful language for CAI.  I would
  98.     greatly appreciate any comments, suggestions or questions you
  99.     may have about the system.  I can be reached on the following
  100.     BBS's :
  101.               The Pinelands BBS -        (609) 354-9259
  102.               Computer Connection        (609) 784-9404
  103.               Compu-Data                 (609) 232-1245
  104.     or on Compuserve (user id 72467,2723).
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.                              PC-EXTOL RELEASE HISTORY
  135.  
  136.  
  137. Release                      Description
  138. -------                      -----------
  139.   1.0                        Initial release of PC-EXTOL - Based on
  140.                              University of Essex Version.
  141.  
  142.   2.0                        Added If-then-else logic to PC-EXTOL making
  143.                              program code much more succinct and logical
  144.  
  145.   2.1                        Added .textfile command to allow large ASCII
  146.                              Files to be Read in to PC-EXTOL at run time - thus
  147.                              saving memory.
  148.  
  149.   2.11                       Fixed bugs in release 2.1 and expanded maximum
  150.                              PC-EXTOL program size to 500 lines.
  151.  
  152.   3.0                        Expanded maximum program size to 2500 lines.
  153.                              Added graphics commands to PC-EXTOL.
  154.                              Added .decrement command to PC-EXTOL.
  155.                              Added several new sample PC-EXTOL files.
  156.                              Added memory-resident screen saving utility.
  157.                              Added .position command to PC-EXTOL.
  158.                              Removed EXRPT program (no longer needed).
  159.                              PC-EXTOL can now be invoked as:
  160.                                    EXTOL filename.
  161.  
  162.   3.1                        Fixed bug with multiple .copy statements
  163.                              Fixed bug with .goto command
  164.                              Enhanced .accept command
  165.                              Added .rand command for random number generation
  166.                              Added .call command for calling external
  167.                                  PC-EXTOL programs.
  168.                              Added routine to search DOS Path for files
  169.                              Improved Error recovery
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.                         1. Invoking a PC-EXTOL program
  207.  
  208.           PC-EXTOL programs may be run in the following ways :
  209.  
  210.                 1) EXTOL filename - where filename is the name of the
  211.                                     PC-EXTOL program to be run.
  212.  
  213.                 2) EXTOL - without a filename, will prompt you for the
  214.                            name of the PC-EXTOL program to be run.
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.                                     PAGE 1                                    
  259. 
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.                            2. Types of statements in PC-EXTOL
  268.  
  269.          PC-EXTOL statements can be grouped into four main catagories.
  270.  
  271.             1. Text lines - printed on screen when the quiz is run
  272.             2. Comments - ignored when the program is run
  273.             3. Command line - PC-EXTOL command
  274.             4. Label - Used as a "landmark" to interrupt flow of control
  275.                        in the program.
  276.  
  277.  
  278.                               2.1 Text Statements
  279.  
  280.          Text statements in PC-EXTOL are any lines that begin with any
  281.     character other than '.', '%', and ':'. Text lines are simply printed
  282.     on the terminal at run time. If the text line contains a variable to be
  283.     printed (see Variable command), then the value of the variable is
  284.     copied into the text line before the line is displayed.
  285.  
  286.     For example:
  287.  
  288.          This is a text line.
  289.          This line contains a variable - The correct answer is <answer>.
  290.  
  291.          Often a text line is used immediately before an "accept" command
  292.     to ask a question and allow the student to respond.  If you want the
  293.     students response to be on the same line as the text printed, put a "+"
  294.     as the last character of the text line.
  295.     For example:
  296.  
  297.          Please enter the answer+
  298.          .accept
  299.     This code would accept the student's answer on the same line as the
  300.     request (The "+" will not show up on the screen when the program is
  301.     run).
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.                                     PAGE 2                                    
  325. 
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.                                   2.2 Comments
  333.  
  334.          Comments in PC-EXTOL are any lines that begin with a '%'. These lines
  335.     are ignored by the program and are included by the programmer only to
  336.     make a comment about the program.
  337.  
  338.     For example:     %This is a comment.
  339.  
  340.                                   2.3 Commands
  341.          Commands in PC-EXTOL are any lines beginning with a '.'. These lines
  342.     perform various functions which will be explained in Chapter 3.
  343.     Valid commands in PC-EXTOL are:
  344.  
  345.          .accept                     .increment
  346.          .call                       .keyword
  347.          .caseon                     .mark
  348.          .caseoff                    .match
  349.          .clear                      .mode
  350.          .copy                       .monitor
  351.          .decrement                  .perform
  352.          .define                     .position
  353.          .end                        .print
  354.          .exact                      .rand
  355.          .exit                       .reset
  356.          .feed                       .response
  357.          .goto                       .screenfile
  358.          .if                         .stop
  359.          .else                       .textfile
  360.          .enddo                      .<
  361.  
  362.     ALL COMMANDS MUST BE ENTERED IN LOWER CASE !!
  363.  
  364.  
  365.                                    2.4 Labels
  366.          Any PC-EXTOL line beginning with a ':' is considered a label. If
  367.     during the program, you wanted to repeat certain lines of code, the
  368.     goto command would need a 'landmark' to go to.
  369.  
  370.     For example:
  371.          :again
  372.          Enter your name
  373.          .accept
  374.          .goto.again
  375.     The goto command would go to the label named 'again'.
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.                                     PAGE 3                                    
  391. 
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.                             3. Commands in PC-EXTOL
  401.  
  402.  
  403.          note: all commands in PC-EXTOL must be entered in lower case letters!
  404.  
  405.  
  406.                         3.0  Score counters in PC-EXTOL
  407.  
  408.          With PC-EXTOL, up to 10 counters can be kept during the execution of
  409.     the program. These counters can be used to keep track of how many
  410.     correct answers the student entered, or how many times the student took
  411.     to get the correct answer or many other things. The counters are
  412.     numbered 0 to 9 and are used with the following commands:
  413.                                    .increment
  414.                                    .decrement
  415.                                    .goto
  416.                                    .match
  417.                                    .print
  418.                                    .reset
  419.                                    .if
  420.                                    .rand
  421.  
  422.  
  423.                            3.1 The accept command
  424.  
  425.     Format 1 : .accept
  426.  
  427.     Format 2 : .accept to <variable>
  428.  
  429.     Where    : variable is the name of any user defined variable
  430.  
  431.          The accept command allows the person taking the quiz a chance to
  432.     enter a response.
  433.     For example:
  434.  
  435.          Type in your name.
  436.          .accept
  437.  
  438.     The above lines would prompt the user to enter his or her name and
  439.     would then wait until the student keyed in his name and pressed the
  440.     return key.
  441.  
  442.     The accept command can also optionally store the response into a user
  443.     defined variable.  For example:
  444.  
  445.         .accept to <myvar>  - would store the response in myvar.
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.                                     PAGE 4                                    
  457. 
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.                              3.2 The call command
  466.     Format : .call filename
  467.  
  468.     Where  : filename is the name of any valid PC-EXTOL program.
  469.  
  470.          The call command will immediately execute the PC-EXTOL program
  471.     specified and will then return to the calling program at the statement
  472.     immediately following the call statement.  Score counters and variables
  473.     may be changed by the called program and they will retain their changed
  474.     values when control is returned to the calling program.
  475.  
  476.          Note - internal data from the calling program is saved on disk in
  477.     a temporary file, so there must be adequate room on the disk for storage
  478.     of these files (10K should be plenty).
  479.  
  480.  
  481.  
  482.                              3.3  The caseon command
  483.  
  484.     The caseon command causes any answers keyed in by the student to be
  485.     converted to all upper case before being compared with the proper
  486.     answers.  When using the caseon function, be sure that all answers that
  487.     you compare the student's response against, are keyed in upper case in
  488.     your program code.  For example:
  489.  
  490.         .caseon
  491.         Who did Tom fall in love with?
  492.         .accept
  493.         .match(1,1).POLLY.
  494.  
  495.  
  496.  
  497.                              3.4  The caseoff command
  498.          The caseoff command cancels the effects of the caseon command.
  499.  
  500.  
  501.  
  502.                               3.5 The clear command
  503.  
  504.     Format : .clear
  505.  
  506.          The clear command simply clears the screen.
  507.  
  508.  
  509.  
  510.                                3.6 The copy command
  511.  
  512.     Format : .copy filename
  513.  
  514.     Where  : filename is the name of a file to copy.
  515.  
  516.          This command copies the contents of filename into the
  517.     PC-EXTOL program.
  518.  
  519.  
  520.  
  521.  
  522.                                     PAGE 5                                    
  523. 
  524.  
  525.  
  526.  
  527.  
  528.  
  529.  
  530.                             3.7 The decrement command
  531.  
  532.     Format : .decrement(x,y)
  533.  
  534.     Where  : x is the number of a score counter,
  535.              y is the amount to decrement x by.
  536.  
  537.          The decrement command decreases the value of a score counter
  538.     unconditionally by y.
  539.  
  540.  
  541.                               3.8 The define command
  542.  
  543.     Format : .define drillname
  544.  
  545.     Where  : drillname is the name of the drill.
  546.  
  547.          Drills are used for portions of an PC-EXTOL program that are to be
  548.     repeated. The variables in the drill can be assigned new values for every
  549.     time the drill is performed. The define command tells the program that
  550.     all following lines are part of a drill until an .end or exit command is
  551.     encountered. These lines will not be executed unless a .perform command
  552.     is encountered. (See Appendix I - Use of Drills)
  553.  
  554.  
  555.                                3.9 The end command
  556.  
  557.     Format : .end
  558.  
  559.          This command is the last command of a drill section. When
  560.     encountered during a drill, it will quit execution of the drill and
  561.     resume with the statement following the .perform.
  562.  
  563.  
  564.                               3.10 The exact command
  565.     Format : .exact
  566.  
  567.          The exact statement affects the match statement. The exact
  568.     statement makes subsequent match statements compare the student's
  569.     response letter for letter with the possible answers.
  570.  
  571.  
  572.                               3.11 The exit command
  573.  
  574.     Format : .exit
  575.  
  576.          This command when encountered during a drill tells the program to
  577.     quit execution of the drill and resume with the statement following the
  578.     .perform command.
  579.  
  580.  
  581.  
  582.                               3.12 The feed command
  583.  
  584.      Format : .feed(n)
  585.  
  586.          The feed command is used to make the output of the program neater.
  587.     The command prints n blank lines on the terminal.
  588.                                     PAGE 6                                    
  589. 
  590.  
  591.  
  592.  
  593.  
  594.  
  595.  
  596.                               3.13 The goto command
  597.  
  598.     Format 1 : .goto.val1
  599.  
  600.     Where    : val1 is the name of a label in the program.
  601.  
  602.          This is an unconditional goto to a specific label.
  603.  
  604.     For example :
  605.  
  606.          :name
  607.          Type in your name.
  608.          .accept
  609.          .goto.name
  610.  
  611.     The above example would ask for a name. When the name was entered, the
  612.     .goto.name command would goto the label called name and ask for another
  613.     name. The above example would repeat indefinitely.
  614.  
  615.     Format 2 : .goto(x).val1.val2.etc.
  616.  
  617.     Where    : x is the number (0-9) of a score counter,
  618.                val1,val2 etc. are names of labels in the program.
  619.  
  620.          This format can goto more than one destination based on the value
  621.     of the score counter.
  622.  
  623.     For example:
  624.  
  625.          Did Tom Sawyer ever go home?
  626.          .accept
  627.          .exact
  628.          .match(1,1).YES.YEAH.TRUE.
  629.          .goto(1).incorrect.correct
  630.          :incorrect
  631.          I'm sorry but he did.
  632.          .stop
  633.          :correct
  634.          That's correct!
  635.          .stop
  636.  
  637.     The above example asks asks a question and matches the student's
  638.     response exactly against the correct answers (YES,YEAH or TRUE).  If a
  639.     match is found, score counter number 1 is increased by 1. Then the goto
  640.     command looks at that value. If the student was wrong, the value of
  641.     counter 1 should be 0 and therefore the program will goto incorrect. If
  642.     the student was right, then the value of counter 1 should be 1 and the
  643.     program will jump to the correct portion of the program. (NOTE - see
  644.     .if command for an easier method of doing this!)
  645.  
  646.  
  647.  
  648.  
  649.  
  650.  
  651.  
  652.  
  653.  
  654.                                     PAGE 7                                    
  655. 
  656.  
  657.  
  658.  
  659.  
  660.  
  661.  
  662.                            3.14 if-else-enddo commands
  663.  
  664.     Format 1   :  .if match(n) do
  665.                      ...(extol commands)
  666.                   .enddo
  667.  
  668.     Where      :  n is the score counter to be looked at.
  669.  
  670.          If the score counter n contains any value greater than zero, the
  671.     commands found between the .if and .enddo will be executed.  Otherwise,
  672.     these commands will be skipped.
  673.  
  674.  
  675.     Format 2  :  .if match(n,m) do
  676.                     ...(extol commands)
  677.                  .enddo
  678.  
  679.     Where     :  n is the score counter to be looked at.
  680.                  m is the value to compare the score counter against
  681.  
  682.          If the score counter n contains any value greater than OR EQUAL to
  683.     value m, the commands found between the .if and .enddo will be executed.
  684.     Otherwise, these commands will be skipped.
  685.  
  686.  
  687.     Format 3  :  .if match(n,m) do                 .if match(n) do
  688.                     ...(extol commands)               ...
  689.                  .else                     OR      .else
  690.                     ...(extol commands)               ...
  691.                  .enddo                            .enddo
  692.  
  693.          The above variation adds an .else condition to the if phrase.  Formats
  694.     1 or 2 may have elses within the .if and .enddo .  If the .if test is true,
  695.     the commands between the .if and .else commands will be executed,
  696.     otherwise, the commands between the .else and .enddo will be executed.
  697.          If commands may also be nested up to 10 levels.  (There can be up to
  698.     9 .if levels within one .if level).
  699.  
  700.     For example:
  701.                    Type the name of Bilbo's sword
  702.                    .accept
  703.                    .match(0,1).STING.
  704.                    .if match(0) do
  705.                        Very good!
  706.                    .else
  707.                        No, it was called "Sting".
  708.                    .enddo
  709.  
  710.                             3.15 The increment command
  711.  
  712.     Format : .increment(x,y)
  713.  
  714.     Where  : x is the number of a score counter,
  715.              y is the amount to increment x by.
  716.  
  717.          The increment command increases the value of a score counter
  718.     unconditionally by y.
  719.  
  720.                                     PAGE 8                                    
  721. 
  722.  
  723.  
  724.  
  725.  
  726.  
  727.  
  728.                             3.16 The keyword statement
  729.  
  730.     Format : .keyword
  731.  
  732.          The keyword statement also affects the match statement. This
  733.     statement makes the match statement check to see if any of the possible
  734.     correct answers are contained WITHIN the student's response.
  735.  
  736.     For example:
  737.  
  738.          .keyword
  739.          .caseon
  740.          Who wrote Huckleberry Finn?+
  741.          .accept
  742.          .match(2,1).TWAIN.CLEMENS.
  743.  
  744.     In this example, keyword matching is in effect. Therefore if the
  745.     student were to type:
  746.  
  747.          Huckleberry Finn was written by Samuel Clemens.
  748.  
  749.     The answer would still be correct because the keyword 'CLEMENS' is
  750.     contained in his answer.
  751.  
  752.  
  753.  
  754.                               3.17 The mark command
  755.  
  756.     Format : .mark
  757.  
  758.          This command writes the values of all the score counters to the
  759.     file specified in the .response statement. THIS COMMAND CAN BE USED
  760.     ONLY IF A RESPONSE FILE HAS BEEN SPECIFIED.
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.  
  775.  
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.  
  785.  
  786.                                     PAGE 9                                    
  787. 
  788.  
  789.  
  790.  
  791.  
  792.  
  793.  
  794.                               3.18 The match command
  795.  
  796.     Format  : .match(x,y).val1.val2.etc.
  797.  
  798.     Where   : x is the score counter (0-9) to be incremented,
  799.               y is the amount to increment score counter x,
  800.               and val1,etc. are the values to compare the student's answer
  801.               against. NOTE - THE LAST MATCH VALUE MUST BE FOLLOWED BY "."
  802.  
  803.          This command compares the student's response against the list of
  804.     possible values. If the response matches one of these values (either
  805.     exactly or by keyword see 2.6 - 2.7), the score counter x is increased
  806.     by y.
  807.  
  808.     For example:
  809.  
  810.          Did Dante write "Inferno" ?
  811.          .accept
  812.          .match(2,1).YES.YEAH.TRUE.
  813.  
  814.     In the above program, the student is asked a question. If he responds by
  815.     typing YES, YEAH or TRUE, the score counter 2 will be increased by 1. If he
  816.     types in anything else, the score counter will be unchanged.
  817.  
  818.     Note that in the above example the answers that the student's response
  819.     is to be compared against are all in upper case.  If the .caseon command
  820.     is used, all answers keyed in by the student are converted into upper
  821.     case before they are compared against the values in the .match command.
  822.     If the .caseon option is used, all values in the match command must be
  823.     entered in upper case (see .caseon command).
  824.  
  825.  
  826.  
  827.                               3.19 The mode command
  828.     Format : .mode=xxxx
  829.  
  830.     Where  : xxxx = MEDG for medium resolution graphics
  831.              xxxx = HIGR for high resolution graphics
  832.              xxxx = TEXT for text mode
  833.  
  834.         This command sets the graphics mode in PC-EXTOL.  It is only needed if
  835.     you are using the .screenfile command.  If the screenfile that you are
  836.     displaying in your PC-EXTOL program was created with high resolution
  837.     graphics, you would specify ".mode=HIGR".  The default mode is TEXT.
  838.  
  839.     Note - This command automatically clears the screen when it sets the
  840.            new screen mode.
  841.  
  842.  
  843.  
  844.                              3.20 The monitor command
  845.     Format : .monitor=xxxxxx
  846.  
  847.     Where  : xxxxxx = "MONO " for monochrome monitors
  848.           or xxxxxx = "COLOR" for graphics monitors
  849.  
  850.         The monitor command must be used if you are using the .screenfile
  851.     command in your file.  If the monitor you are using can display graphics,
  852.                                    PAGE 10                                    
  853. 
  854.  
  855.  
  856.  
  857.  
  858.  
  859.     you should specify ".monitor=COLOR" otherwise you should specify
  860.     ".monitor=MONO".  This command is not needed if you are not using the
  861.     .screenfile command !
  862.  
  863.  
  864.  
  865.  
  866.  
  867.  
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878.  
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.  
  886.  
  887.  
  888.  
  889.  
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897.  
  898.  
  899.  
  900.  
  901.  
  902.  
  903.  
  904.  
  905.  
  906.  
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.  
  917.  
  918.                                    PAGE 11                                    
  919. 
  920.  
  921.  
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.                             3.21 The perform command
  929.  
  930.     Format : .perform drillname
  931.  
  932.     Where  : drillname is the name of a defined drill.
  933.  
  934.          This command will tell the program to execute a predefined drill
  935.     (see 3.8 The define command). When an .exit or an .end command is
  936.     encountered in the drill, the program will resume with the line
  937.     following the .perform command.
  938.  
  939.  
  940.  
  941.                             3.22 The position command
  942.  
  943.     Format : .position(x,y)
  944.  
  945.      Where : x is the row to positon the cursor at
  946.              y is the column to position the cursor at
  947.  
  948.  
  949.         This command allows you to position the cursor anywhere on the screen
  950.     before displaying PC-EXTOL text.  Row must be between 1 and 25 and Column
  951.     must be between 1 and 80.
  952.  
  953.  
  954.  
  955.                              3.23 The print command
  956.  
  957.     Format : .print(x)
  958.  
  959.     Where  : x is the number of a score counter.
  960.  
  961.          This command prints the value of any score counter onto the
  962.     screen. If you put a "+" after the print statement, the cursor will
  963.     not be positioned on the next line, and any text will be put on
  964.     the same line.
  965.  
  966.  
  967.  
  968.  
  969.  
  970.  
  971.  
  972.  
  973.  
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.                                    PAGE 12                                    
  985. 
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.                               3.24 The rand command
  993.     Format : .rand(x,y)
  994.  
  995.      Where : x is the number of the score counter to store the random number
  996.              y is the highest possible value for the random number
  997.  
  998.  
  999.         This command allows you to create a random number and store it into
  1000.     one of the program counters.  This is very useful for random quizzes and
  1001.     games.
  1002.  
  1003.     For example:
  1004.         .rand(0,100)   - this would create a random number between 1 and 100
  1005.                          and would store the number in score counter 0.
  1006.  
  1007.  
  1008.  
  1009.                              3.25 The reset statement
  1010.  
  1011.     Format : .reset(x)
  1012.  
  1013.     Where  : x is the number (0-9) of a score counter.
  1014.  
  1015.          Often when testing answers for right or wrong, after the test is
  1016.     performed it is necessary to reset the counter value to zero. The reset
  1017.     command does just that.
  1018.  
  1019.  
  1020.  
  1021.                             3.26 The response command
  1022.  
  1023.     Format : .response filename
  1024.  
  1025.     Where  : filename is the name of a response file.
  1026.  
  1027.          A record can be kept of who used the program, when they used it
  1028.     and the values of all the score counters. This command tells what file
  1029.     is to be used to keep track of this. A report can be printed out on the
  1030.     use of the program.  (See Appendix II - Printing Reports).
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.  
  1048.  
  1049.  
  1050.                                    PAGE 13                                    
  1051. 
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.                            3.27 The screenfile command
  1060.  
  1061.     Format : .screenfile=filename
  1062.  
  1063.      Where : filename is the name of the saved screenfile to be loaded and
  1064.              displayed by your PC-EXTOL program.
  1065.  
  1066.         This command loads and displays the screen that was previously saved
  1067.     into the specified filename.  To save a graphics screen you must do one of
  1068.     the following :
  1069.  
  1070.                     1) using a graphics program that allows you to
  1071.                        "BSAVE" screens, save the screens that you will
  1072.                        want to display in PC-EXTOL.
  1073.  
  1074.                     2) use the provided SCRGRAB program as follows:
  1075.                         a) type SCRGRAB
  1076.                         b) run the program which creates the screens that
  1077.                            you want to save
  1078.                         c) when the screen that you want to save is displayed
  1079.                            on your monitor, press the ALT and F9 keys at the
  1080.                            same time. (See SCRGRAB documentation for more
  1081.                            detail).
  1082.  
  1083.  
  1084.                               3.28 The stop command
  1085.  
  1086.     Format : .stop
  1087.  
  1088.          The stop command ends program execution.
  1089.  
  1090.  
  1091.  
  1092.  
  1093.                             3.29 The textfile command
  1094.  
  1095.     Format : .textfile=filename
  1096.  
  1097.      Where : filename is the name of the file containing the desired text.
  1098.  
  1099.          This command is very useful if you want the student to be able to
  1100.     read any ascii file while executing an PC-EXTOL program.  When PC-EXTOL
  1101.     encounters this command, the file will be displayed for the student.
  1102.     The text will be displayed in pages automatically and the student will
  1103.     have the following options:
  1104.  
  1105.          Pressing "N" for the next page of text
  1106.          Pressing "F" for the first page of text
  1107.          Pressing "X" to end the text
  1108.  
  1109.          Another advantage of using this command is that the text lines don't
  1110.     actually get loaded into memory until they are read thus saving memory.
  1111.     Perhaps the most useful aspect of this command is that you can encorporate
  1112.     any ascii files you may already have written into your PC-EXTOL programs
  1113.     without having to copy them over.
  1114.  
  1115.  
  1116.                                    PAGE 14                                    
  1117. 
  1118.  
  1119.  
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.                                3.30 The .< command
  1126.  
  1127.     Format : .<varname>=xxxxxx
  1128.  
  1129.     Where  : varname is the name of any variable,
  1130.              xxxxxxx is the value to be assigned to the variable.
  1131.  
  1132.          Variables are very useful in any PC-EXTOL program, especially if
  1133.     drills are to be used.  Any text statements or the .match command can use
  1134.     variables. The same variable can be reset to a new value later in the
  1135.     program.
  1136.  
  1137.     For example:
  1138.          .<answer>=yes
  1139.          Does 2+2=4?
  1140.          .accept
  1141.          .match(1,1).<answer>.
  1142.          .goto(1).wrong.right
  1143.          :wrong
  1144.          I'm sorry but the answer was <answer>.
  1145.          .stop
  1146.          :right
  1147.          Very good! The answer was <answer>.
  1148.          .stop
  1149.  
  1150.     In the above example the variable 'answer' is assigned a value of
  1151.     'yes'. The match command compares the student's answer to what 'answer'
  1152.     contains which is 'yes'. Then if the student was incorrect the program
  1153.     prints :
  1154.             I'm sorry but the answer was yes.
  1155.     If he was correct, the program prints :
  1156.             Very good! The answer was yes.
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.                                    PAGE 15                                    
  1183. 
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.                           Appendix I - Use of Drills
  1192.  
  1193.  
  1194.     Drills are one of the most powerful features of the Extol language.
  1195.     Drills allow you to code logic one time and execute the drill several
  1196.     times within the same program.  To use the drill facility, you must
  1197.     be familiar with the PC-EXTOL commands - .define, .exit, .end, and the
  1198.     use of variables.  An example follows:
  1199.  
  1200.               %Sample of Drill use in Extol
  1201.               %This program quizzes students on the gender of
  1202.               %french nouns. The student keys in M if the noun
  1203.               %is masculing and F if the noun is feminine.
  1204.               %The drill will determine whether or not the student
  1205.               %is correct and keep a count of correct answers
  1206.               %
  1207.               %The drill code follows:
  1208.               .define noundrill
  1209.                   Please enter the gender of the noun, <noun>+
  1210.                   .accept
  1211.                   .reset(1)
  1212.                   .match(1,1).<answer>.
  1213.                   .goto(1).incorrect.correct
  1214.                   :incorrect
  1215.                   Sorry, but the gender of <noun> is <answer>.
  1216.                   .exit
  1217.                   :correct
  1218.                   Very good! The gender of <noun> is <answer>.
  1219.                   .increment(2,1)
  1220.               .end
  1221.               %This is the end of the drill code
  1222.               %Program code follows:
  1223.               Welcome to the french noun quiz.  You will be given
  1224.               a noun and will be asked to type in the gender of
  1225.               the noun.  Please type in "M" if the noun is masculine
  1226.               and "F" if the noun is feminine.  Good Luck!
  1227.               %
  1228.               .caseon
  1229.               .exact
  1230.               .<noun>=plume
  1231.               .<answer>=F
  1232.               .perform noundrill
  1233.               .<noun>=fils
  1234.               .<answer>=M
  1235.               .perform noundrill
  1236.               Your final score was+
  1237.               .print(2)
  1238.               out of a possible 2.
  1239.               .stop
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.                                    PAGE 16                                    
  1249. 
  1250.  
  1251.  
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.     The statements between the .define and the .end statement are what
  1258.     make up the drill called "noundrill".  When the program encounters
  1259.     a .perform command, these lines will be executed.  Otherwise the
  1260.     program skips over this section.
  1261.  
  1262.     The program statements begin with the .caseon command and continue
  1263.     for the rest of the program.  Notice that the program first sets
  1264.     the values for <noun> and for <answer> before calling the drill
  1265.     with the .perform command.  The drill portion of the code accepts
  1266.     the student's answer, compares it against the correct answer and
  1267.     prints a message telling the student whether he was right or wrong.
  1268.  
  1269.     This is just a very brief sample of the use of the drill command.
  1270.     This command is ideal for language drills or any repetitive teaching
  1271.     method.
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314.                                    PAGE 17                                    
  1315. 
  1316.  
  1317.  
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.                           Appendix II - Printing Reports
  1324.  
  1325.  
  1326.  
  1327.          If in an PC-EXTOL program you specified a response file and
  1328.     wrote a student's scores to it (see .response and .mark commands),
  1329.     A report may be printed listing all students who ran the program,
  1330.     when they started and finished and what the score counters contained
  1331.     when the .mark command was executed.  To produce the report enter
  1332.     the following command from DOS.
  1333.  
  1334.               A> PRINT filename
  1335.  
  1336.                    or
  1337.  
  1338.               A> TYPE filename > LPT1
  1339.  
  1340.  
  1341.  
  1342.  
  1343.  
  1344.  
  1345.  
  1346.  
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.  
  1378.  
  1379.  
  1380.                                    PAGE 18                                    
  1381. 
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387. $