Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ quiz(6) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought



QUIZ(6,C)                   AIX Commands Reference                    QUIZ(6,C)



-------------------------------------------------------------------------------
quiz



PURPOSE

Tests your knowledge.

SYNTAX


                   +------------+   +---------------------------+
/usr/games/quiz ---| +--------+ |---|                           |---|
                   +-| -ifile |-+   +- category1 --- category2 -+
                    ^| -t     ||
                    |+--------+|
                    +----------+


Note:  This command does not have MBCS support.

DESCRIPTION

The quiz game gives associative knowledge tests on various selectable subjects.
It asks about items chosen from category1 and expects answers from category2.
If you do not specify the categories, quiz gives instructions and lists the
available categories.

The quiz game gives the correct answer whenever you press the Enter key by
itself.  The game ends when there are no more questions or when you press the
interrupt key; quiz reports a score and exits.

FLAGS

-ifile Substitutes the named file for the standard index file.

       Note:  In the following syntax description, brackets are normally used
              to indicate that an item is optional; a bold-faced bracket or
              brace, however, should be entered as a literal part of the
              syntax.  A vertical list of items indicates that one and only one
              must be chosen.  The lines in file must have the following
              syntax:

       line  = category [ :category] . .  .
       category
             = alternate [  |alternate ] . . .
       alternate
             = [primary]
       primary
             = character
                 [category]



Processed November 8, 1990         QUIZ(6,C)                                  1





QUIZ(6,C)                   AIX Commands Reference                    QUIZ(6,C)



                 option
       option
             = {category}

       In an index file, the first category of each line must specify the name
       of an information file (the information file contains the names of files
       with quiz material).  The remaining categories specify the order and
       contents of the data in each line of the information file.  The quiz
       data in information files follows the same syntax.  A \ (backslash) is
       an escape character which allows you to quote syntactically significant
       characters or to insert a new-line character (\n) into a line.  When
       either a question or its answer is blank, quiz does not ask it.  The
       construct a|ab does not work in an information file.  Use a{b}.

-t     Provides a tutorial.  Repeats missed questions and introduces new
       material gradually.

EXAMPLES

  1. To start a Latin-to-English quiz:

      /usr/games/quiz latin english

    The quiz command displays Latin words and waits for you to enter what they
    mean in English.

  2. To start an English-to-Latin quiz:

      /usr/games/quiz english latin

  3. To set up a Latin-English quiz, add the following line to the index file:

      /usr/games/lib/quiz/latin:latin:english

    This line specifies that the file "/usr/games/lib/quiz/latin" contains
    information about the categories "latin" and "english".

    You can add new categories to the standard index file,
    /usr/games/lib/quiz/index, or to an index file or your own.  If you create
    your own index file, run the quiz command with the -i file flag to give it
    your list of quiz topics.

  4. This is a sample information file:

      cor:heart
      sacerdos:priest{ess}
      quando:when|since|because
      optat:{{s}he  |it  } [desires|wishes]\
      |desire|wish
      alb[us|a|um]:white





Processed November 8, 1990         QUIZ(6,C)                                  2





QUIZ(6,C)                   AIX Commands Reference                    QUIZ(6,C)



    This information file contains Latin and English words.  The : (colon)
    separates each Latin word from its English equivalent.  Items enclosed in
    "{   }" (braces) are optional.  A | (vertical bar) separates two items when
    entering either is correct.  The [ ] (brackets) group items separated by
    vertical bars.

The first line accepts only the answer "heart" in response to the Latin word
"cor".  The second accepts either "priest" or "priestess" in response to
"sacerdos".  The third line accepts "when", "since", or "because" for "quando".

The \ (backslash) at the end of the fourth line indicates that this entry
continues on the next line.  In other words, the fourth and fifth lines
together form one entry.  This entry accepts any of the following in response
to "optat":

she desires    it desires     desire
she wishes     it wishes      wish
he desires     desires
he wishes      wishes

If you start a Latin-to-English quiz, then the last line of this sample
information file instructs quiz to ask you the meaning of "albus".  If you
start an English-to-Latin quiz, then quiz displays "white" and accepts "albus"
"alba", or "album" for the answer.

If any of the characters "{", "}", [, ], or | appear in a question item, then
quiz gives the first alternative of every | group and displays every optional
group.  Thus, the English-to-Latin question for the fourth definition in this
sample is "she desires".

FILES

/usr/games/lib/quiz/index
/usr/games/lib/quiz/*





















Processed November 8, 1990         QUIZ(6,C)                                  3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026