home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload
/
ShartewareOverload.cdr
/
educ
/
extol3.zip
/
EXTOL.DOC
< prev
next >
Wrap
Text File
|
1988-02-06
|
33KB
|
1,387 lines
$
PC-EXTOL
Version 3.1
Copyright (c) 1988
by
Michael C. Taylor
129 Country Club Rd.
Pine Hill, NJ 08021
Your diskette should contain the following files:
EXTOL.EXE - EXTOL PROGRAM
EXTOLTOC.DOC - TABLE OF CONTENTS FOR EXTOL.DOC
EXTOL.DOC - PC-EXTOL DOCUMENTATION
GENDER.EXT - SAMPLE USE OF DRILL COMMAND
ALICE.EXT - SAMPLE QUIZ ON ALICE IN WONDERLAND
BEATLES.EXT - BEATLES TRIVIA QUIZ
GRAPH.EXT - SAMPLE PC-EXTOL GRAPHICS PROGRAM (NEEDS CGA)
TEXT.EXT - SAMPLE PC-EXTOL PROGRAM USING "TEXTFILE"
MENU.EXT - MENU FOR SAMPLE PROGRAMS
SCRGRAB.COM - MEMORY RESIDENT "SCREEN-GRABBER" (SEE SCRGRAB.DOC)
SCRGRAB.DOC - DOCUMENTATION FOR ABOVE
EXTOL.PIC - File used by GRAPH.EXT
Introduction
PC-EXTOL is a programming language designed especially for
Computer-Aided Instruction (CAI) which is particularly well-suited for
tutorials and instruction in non-mathematical domains.
EXTOL was originally developed at Essex University in England, and
the PC version is a full implementation of EXTOL along with several
enhancements.
PC-EXTOL is distributed as shareware. You are encouraged to
copy and distribute copies of the program. You are prohibited from
altering the program code and documentation in any way.
PC-EXTOL is the result of several years of programming, debugging
and documenting. If you find the programs useful, please register
your copy by sending a contribution ($25 is suggested) to:
Michael C. Taylor
129 Country Club Rd
Pine Hill, NJ 08021
In exchange for registering your copy, you will be sent the
next version of PC-EXTOL free of charge and will be notified of
any future enhancements by mail.
PC-EXTOL is a very useful language for CAI. I would
greatly appreciate any comments, suggestions or questions you
may have about the system. I can be reached on the following
BBS's :
The Pinelands BBS - (609) 354-9259
Computer Connection (609) 784-9404
Compu-Data (609) 232-1245
or on Compuserve (user id 72467,2723).
PC-EXTOL RELEASE HISTORY
Release Description
------- -----------
1.0 Initial release of PC-EXTOL - Based on
University of Essex Version.
2.0 Added If-then-else logic to PC-EXTOL making
program code much more succinct and logical
2.1 Added .textfile command to allow large ASCII
Files to be Read in to PC-EXTOL at run time - thus
saving memory.
2.11 Fixed bugs in release 2.1 and expanded maximum
PC-EXTOL program size to 500 lines.
3.0 Expanded maximum program size to 2500 lines.
Added graphics commands to PC-EXTOL.
Added .decrement command to PC-EXTOL.
Added several new sample PC-EXTOL files.
Added memory-resident screen saving utility.
Added .position command to PC-EXTOL.
Removed EXRPT program (no longer needed).
PC-EXTOL can now be invoked as:
EXTOL filename.
3.1 Fixed bug with multiple .copy statements
Fixed bug with .goto command
Enhanced .accept command
Added .rand command for random number generation
Added .call command for calling external
PC-EXTOL programs.
Added routine to search DOS Path for files
Improved Error recovery
1. Invoking a PC-EXTOL program
PC-EXTOL programs may be run in the following ways :
1) EXTOL filename - where filename is the name of the
PC-EXTOL program to be run.
2) EXTOL - without a filename, will prompt you for the
name of the PC-EXTOL program to be run.
PAGE 1
2. Types of statements in PC-EXTOL
PC-EXTOL statements can be grouped into four main catagories.
1. Text lines - printed on screen when the quiz is run
2. Comments - ignored when the program is run
3. Command line - PC-EXTOL command
4. Label - Used as a "landmark" to interrupt flow of control
in the program.
2.1 Text Statements
Text statements in PC-EXTOL are any lines that begin with any
character other than '.', '%', and ':'. Text lines are simply printed
on the terminal at run time. If the text line contains a variable to be
printed (see Variable command), then the value of the variable is
copied into the text line before the line is displayed.
For example:
This is a text line.
This line contains a variable - The correct answer is <answer>.
Often a text line is used immediately before an "accept" command
to ask a question and allow the student to respond. If you want the
students response to be on the same line as the text printed, put a "+"
as the last character of the text line.
For example:
Please enter the answer+
.accept
This code would accept the student's answer on the same line as the
request (The "+" will not show up on the screen when the program is
run).
PAGE 2
2.2 Comments
Comments in PC-EXTOL are any lines that begin with a '%'. These lines
are ignored by the program and are included by the programmer only to
make a comment about the program.
For example: %This is a comment.
2.3 Commands
Commands in PC-EXTOL are any lines beginning with a '.'. These lines
perform various functions which will be explained in Chapter 3.
Valid commands in PC-EXTOL are:
.accept .increment
.call .keyword
.caseon .mark
.caseoff .match
.clear .mode
.copy .monitor
.decrement .perform
.define .position
.end .print
.exact .rand
.exit .reset
.feed .response
.goto .screenfile
.if .stop
.else .textfile
.enddo .<
ALL COMMANDS MUST BE ENTERED IN LOWER CASE !!
2.4 Labels
Any PC-EXTOL line beginning with a ':' is considered a label. If
during the program, you wanted to repeat certain lines of code, the
goto command would need a 'landmark' to go to.
For example:
:again
Enter your name
.accept
.goto.again
The goto command would go to the label named 'again'.
PAGE 3
3. Commands in PC-EXTOL
note: all commands in PC-EXTOL must be entered in lower case letters!
3.0 Score counters in PC-EXTOL
With PC-EXTOL, up to 10 counters can be kept during the execution of
the program. These counters can be used to keep track of how many
correct answers the student entered, or how many times the student took
to get the correct answer or many other things. The counters are
numbered 0 to 9 and are used with the following commands:
.increment
.decrement
.goto
.match
.print
.reset
.if
.rand
3.1 The accept command
Format 1 : .accept
Format 2 : .accept to <variable>
Where : variable is the name of any user defined variable
The accept command allows the person taking the quiz a chance to
enter a response.
For example:
Type in your name.
.accept
The above lines would prompt the user to enter his or her name and
would then wait until the student keyed in his name and pressed the
return key.
The accept command can also optionally store the response into a user
defined variable. For example:
.accept to <myvar> - would store the response in myvar.
PAGE 4
3.2 The call command
Format : .call filename
Where : filename is the name of any valid PC-EXTOL program.
The call command will immediately execute the PC-EXTOL program
specified and will then return to the calling program at the statement
immediately following the call statement. Score counters and variables
may be changed by the called program and they will retain their changed
values when control is returned to the calling program.
Note - internal data from the calling program is saved on disk in
a temporary file, so there must be adequate room on the disk for storage
of these files (10K should be plenty).
3.3 The caseon command
The caseon command causes any answers keyed in by the student to be
converted to all upper case before being compared with the proper
answers. When using the caseon function, be sure that all answers that
you compare the student's response against, are keyed in upper case in
your program code. For example:
.caseon
Who did Tom fall in love with?
.accept
.match(1,1).POLLY.
3.4 The caseoff command
The caseoff command cancels the effects of the caseon command.
3.5 The clear command
Format : .clear
The clear command simply clears the screen.
3.6 The copy command
Format : .copy filename
Where : filename is the name of a file to copy.
This command copies the contents of filename into the
PC-EXTOL program.
PAGE 5
3.7 The decrement command
Format : .decrement(x,y)
Where : x is the number of a score counter,
y is the amount to decrement x by.
The decrement command decreases the value of a score counter
unconditionally by y.
3.8 The define command
Format : .define drillname
Where : drillname is the name of the drill.
Drills are used for portions of an PC-EXTOL program that are to be
repeated. The variables in the drill can be assigned new values for every
time the drill is performed. The define command tells the program that
all following lines are part of a drill until an .end or exit command is
encountered. These lines will not be executed unless a .perform command
is encountered. (See Appendix I - Use of Drills)
3.9 The end command
Format : .end
This command is the last command of a drill section. When
encountered during a drill, it will quit execution of the drill and
resume with the statement following the .perform.
3.10 The exact command
Format : .exact
The exact statement affects the match statement. The exact
statement makes subsequent match statements compare the student's
response letter for letter with the possible answers.
3.11 The exit command
Format : .exit
This command when encountered during a drill tells the program to
quit execution of the drill and resume with the statement following the
.perform command.
3.12 The feed command
Format : .feed(n)
The feed command is used to make the output of the program neater.
The command prints n blank lines on the terminal.
PAGE 6
3.13 The goto command
Format 1 : .goto.val1
Where : val1 is the name of a label in the program.
This is an unconditional goto to a specific label.
For example :
:name
Type in your name.
.accept
.goto.name
The above example would ask for a name. When the name was entered, the
.goto.name command would goto the label called name and ask for another
name. The above example would repeat indefinitely.
Format 2 : .goto(x).val1.val2.etc.
Where : x is the number (0-9) of a score counter,
val1,val2 etc. are names of labels in the program.
This format can goto more than one destination based on the value
of the score counter.
For example:
Did Tom Sawyer ever go home?
.accept
.exact
.match(1,1).YES.YEAH.TRUE.
.goto(1).incorrect.correct
:incorrect
I'm sorry but he did.
.stop
:correct
That's correct!
.stop
The above example asks asks a question and matches the student's
response exactly against the correct answers (YES,YEAH or TRUE). If a
match is found, score counter number 1 is increased by 1. Then the goto
command looks at that value. If the student was wrong, the value of
counter 1 should be 0 and therefore the program will goto incorrect. If
the student was right, then the value of counter 1 should be 1 and the
program will jump to the correct portion of the program. (NOTE - see
.if command for an easier method of doing this!)
PAGE 7
3.14 if-else-enddo commands
Format 1 : .if match(n) do
...(extol commands)
.enddo
Where : n is the score counter to be looked at.
If the score counter n contains any value greater than zero, the
commands found between the .if and .enddo will be executed. Otherwise,
these commands will be skipped.
Format 2 : .if match(n,m) do
...(extol commands)
.enddo
Where : n is the score counter to be looked at.
m is the value to compare the score counter against
If the score counter n contains any value greater than OR EQUAL to
value m, the commands found between the .if and .enddo will be executed.
Otherwise, these commands will be skipped.
Format 3 : .if match(n,m) do .if match(n) do
...(extol commands) ...
.else OR .else
...(extol commands) ...
.enddo .enddo
The above variation adds an .else condition to the if phrase. Formats
1 or 2 may have elses within the .if and .enddo . If the .if test is true,
the commands between the .if and .else commands will be executed,
otherwise, the commands between the .else and .enddo will be executed.
If commands may also be nested up to 10 levels. (There can be up to
9 .if levels within one .if level).
For example:
Type the name of Bilbo's sword
.accept
.match(0,1).STING.
.if match(0) do
Very good!
.else
No, it was called "Sting".
.enddo
3.15 The increment command
Format : .increment(x,y)
Where : x is the number of a score counter,
y is the amount to increment x by.
The increment command increases the value of a score counter
unconditionally by y.
PAGE 8
3.16 The keyword statement
Format : .keyword
The keyword statement also affects the match statement. This
statement makes the match statement check to see if any of the possible
correct answers are contained WITHIN the student's response.
For example:
.keyword
.caseon
Who wrote Huckleberry Finn?+
.accept
.match(2,1).TWAIN.CLEMENS.
In this example, keyword matching is in effect. Therefore if the
student were to type:
Huckleberry Finn was written by Samuel Clemens.
The answer would still be correct because the keyword 'CLEMENS' is
contained in his answer.
3.17 The mark command
Format : .mark
This command writes the values of all the score counters to the
file specified in the .response statement. THIS COMMAND CAN BE USED
ONLY IF A RESPONSE FILE HAS BEEN SPECIFIED.
PAGE 9
3.18 The match command
Format : .match(x,y).val1.val2.etc.
Where : x is the score counter (0-9) to be incremented,
y is the amount to increment score counter x,
and val1,etc. are the values to compare the student's answer
against. NOTE - THE LAST MATCH VALUE MUST BE FOLLOWED BY "."
This command compares the student's response against the list of
possible values. If the response matches one of these values (either
exactly or by keyword see 2.6 - 2.7), the score counter x is increased
by y.
For example:
Did Dante write "Inferno" ?
.accept
.match(2,1).YES.YEAH.TRUE.
In the above program, the student is asked a question. If he responds by
typing YES, YEAH or TRUE, the score counter 2 will be increased by 1. If he
types in anything else, the score counter will be unchanged.
Note that in the above example the answers that the student's response
is to be compared against are all in upper case. If the .caseon command
is used, all answers keyed in by the student are converted into upper
case before they are compared against the values in the .match command.
If the .caseon option is used, all values in the match command must be
entered in upper case (see .caseon command).
3.19 The mode command
Format : .mode=xxxx
Where : xxxx = MEDG for medium resolution graphics
xxxx = HIGR for high resolution graphics
xxxx = TEXT for text mode
This command sets the graphics mode in PC-EXTOL. It is only needed if
you are using the .screenfile command. If the screenfile that you are
displaying in your PC-EXTOL program was created with high resolution
graphics, you would specify ".mode=HIGR". The default mode is TEXT.
Note - This command automatically clears the screen when it sets the
new screen mode.
3.20 The monitor command
Format : .monitor=xxxxxx
Where : xxxxxx = "MONO " for monochrome monitors
or xxxxxx = "COLOR" for graphics monitors
The monitor command must be used if you are using the .screenfile
command in your file. If the monitor you are using can display graphics,
PAGE 10
you should specify ".monitor=COLOR" otherwise you should specify
".monitor=MONO". This command is not needed if you are not using the
.screenfile command !
PAGE 11
3.21 The perform command
Format : .perform drillname
Where : drillname is the name of a defined drill.
This command will tell the program to execute a predefined drill
(see 3.8 The define command). When an .exit or an .end command is
encountered in the drill, the program will resume with the line
following the .perform command.
3.22 The position command
Format : .position(x,y)
Where : x is the row to positon the cursor at
y is the column to position the cursor at
This command allows you to position the cursor anywhere on the screen
before displaying PC-EXTOL text. Row must be between 1 and 25 and Column
must be between 1 and 80.
3.23 The print command
Format : .print(x)
Where : x is the number of a score counter.
This command prints the value of any score counter onto the
screen. If you put a "+" after the print statement, the cursor will
not be positioned on the next line, and any text will be put on
the same line.
PAGE 12
3.24 The rand command
Format : .rand(x,y)
Where : x is the number of the score counter to store the random number
y is the highest possible value for the random number
This command allows you to create a random number and store it into
one of the program counters. This is very useful for random quizzes and
games.
For example:
.rand(0,100) - this would create a random number between 1 and 100
and would store the number in score counter 0.
3.25 The reset statement
Format : .reset(x)
Where : x is the number (0-9) of a score counter.
Often when testing answers for right or wrong, after the test is
performed it is necessary to reset the counter value to zero. The reset
command does just that.
3.26 The response command
Format : .response filename
Where : filename is the name of a response file.
A record can be kept of who used the program, when they used it
and the values of all the score counters. This command tells what file
is to be used to keep track of this. A report can be printed out on the
use of the program. (See Appendix II - Printing Reports).
PAGE 13
3.27 The screenfile command
Format : .screenfile=filename
Where : filename is the name of the saved screenfile to be loaded and
displayed by your PC-EXTOL program.
This command loads and displays the screen that was previously saved
into the specified filename. To save a graphics screen you must do one of
the following :
1) using a graphics program that allows you to
"BSAVE" screens, save the screens that you will
want to display in PC-EXTOL.
2) use the provided SCRGRAB program as follows:
a) type SCRGRAB
b) run the program which creates the screens that
you want to save
c) when the screen that you want to save is displayed
on your monitor, press the ALT and F9 keys at the
same time. (See SCRGRAB documentation for more
detail).
3.28 The stop command
Format : .stop
The stop command ends program execution.
3.29 The textfile command
Format : .textfile=filename
Where : filename is the name of the file containing the desired text.
This command is very useful if you want the student to be able to
read any ascii file while executing an PC-EXTOL program. When PC-EXTOL
encounters this command, the file will be displayed for the student.
The text will be displayed in pages automatically and the student will
have the following options:
Pressing "N" for the next page of text
Pressing "F" for the first page of text
Pressing "X" to end the text
Another advantage of using this command is that the text lines don't
actually get loaded into memory until they are read thus saving memory.
Perhaps the most useful aspect of this command is that you can encorporate
any ascii files you may already have written into your PC-EXTOL programs
without having to copy them over.
PAGE 14
3.30 The .< command
Format : .<varname>=xxxxxx
Where : varname is the name of any variable,
xxxxxxx is the value to be assigned to the variable.
Variables are very useful in any PC-EXTOL program, especially if
drills are to be used. Any text statements or the .match command can use
variables. The same variable can be reset to a new value later in the
program.
For example:
.<answer>=yes
Does 2+2=4?
.accept
.match(1,1).<answer>.
.goto(1).wrong.right
:wrong
I'm sorry but the answer was <answer>.
.stop
:right
Very good! The answer was <answer>.
.stop
In the above example the variable 'answer' is assigned a value of
'yes'. The match command compares the student's answer to what 'answer'
contains which is 'yes'. Then if the student was incorrect the program
prints :
I'm sorry but the answer was yes.
If he was correct, the program prints :
Very good! The answer was yes.
PAGE 15
Appendix I - Use of Drills
Drills are one of the most powerful features of the Extol language.
Drills allow you to code logic one time and execute the drill several
times within the same program. To use the drill facility, you must
be familiar with the PC-EXTOL commands - .define, .exit, .end, and the
use of variables. An example follows:
%Sample of Drill use in Extol
%This program quizzes students on the gender of
%french nouns. The student keys in M if the noun
%is masculing and F if the noun is feminine.
%The drill will determine whether or not the student
%is correct and keep a count of correct answers
%
%The drill code follows:
.define noundrill
Please enter the gender of the noun, <noun>+
.accept
.reset(1)
.match(1,1).<answer>.
.goto(1).incorrect.correct
:incorrect
Sorry, but the gender of <noun> is <answer>.
.exit
:correct
Very good! The gender of <noun> is <answer>.
.increment(2,1)
.end
%This is the end of the drill code
%Program code follows:
Welcome to the french noun quiz. You will be given
a noun and will be asked to type in the gender of
the noun. Please type in "M" if the noun is masculine
and "F" if the noun is feminine. Good Luck!
%
.caseon
.exact
.<noun>=plume
.<answer>=F
.perform noundrill
.<noun>=fils
.<answer>=M
.perform noundrill
Your final score was+
.print(2)
out of a possible 2.
.stop
PAGE 16
The statements between the .define and the .end statement are what
make up the drill called "noundrill". When the program encounters
a .perform command, these lines will be executed. Otherwise the
program skips over this section.
The program statements begin with the .caseon command and continue
for the rest of the program. Notice that the program first sets
the values for <noun> and for <answer> before calling the drill
with the .perform command. The drill portion of the code accepts
the student's answer, compares it against the correct answer and
prints a message telling the student whether he was right or wrong.
This is just a very brief sample of the use of the drill command.
This command is ideal for language drills or any repetitive teaching
method.
PAGE 17
Appendix II - Printing Reports
If in an PC-EXTOL program you specified a response file and
wrote a student's scores to it (see .response and .mark commands),
A report may be printed listing all students who ran the program,
when they started and finished and what the score counters contained
when the .mark command was executed. To produce the report enter
the following command from DOS.
A> PRINT filename
or
A> TYPE filename > LPT1
PAGE 18
$