# CHAPTER 7: On-Line Help Files

The directory `help` where Empress is installed contains the help files that can be accessed by the on-line help facility in Empress. These may be supplemented with your own help files. To make a new help file accessible through Empress, place it in the `help` directory and make an entry for it in the help file dictionary `_dict`. The file `_dict` contains entries of the form:

       helpfile {, <Tab>} topic

where:

`helpfile` | Name of the file displayed when help is requested on the `keyword`. One file may be associated with several keywords.
`<Tab>` | The tab character is a separator.
`topic` | This may contain asterisks (`*`) for pattern matching. A `*` matches any character (including none at all) in the position where it appears. For example, the entry `edit *ed*` allows `help edit`, `help ed`, and `help editor` to find the file `edit`. A `?` may also be used to match any single character, as in Empress Query Language pattern matching. The keyword should not contain embedded blanks.

When `help topic` is typed into Empress, the `_dict` file is searched linearly until a match for topic is found in the keyword list. Keywords that use no pattern matching, being more specific in terms of matching requirements, should appear earlier in the list than keywords that use pattern matching so that less specific requests will find a help file. For instance, the list:

       database  database
       datatype  datatype
       database  *data*

is a suitable ordering, but the following list would never allow `datatype` to be matched:

       database  database
       database  *data*
       datatype  datatype

As an example, to add a file giving help on error messages you might create a file called `errors` containing `See the Database Administrator`. To install this as a help file, move `errors` into the `help` directory, and add the following line to `_dict`:

       errors <Tab> *error*

Users will now have the contents of errors printed out when they enter any help request in which the topic contains the word `error`. To also have the error file printed in response to the command:

       help message

add the following line to `_dict`:

       errors <Tab> *message*