Quintus Prolog Manual


(PREV) (NEXT)

g-17: On-line Help

g-17-0: Introduction

The documentation for Quintus Prolog is contained in the 'Quintus Prolog Manual'. This documentation can be accessed on-line by using special built-in predicates which are described below. These predicates view the manual as a single tree structure with nodes threaded together by cross-references, which you can traverse in order to find the information you need. It is easier to use this help system through the Emacs interface or the Quintus User Interface, but it is possible to do everything without them. For documentation on using the help system for Quintus User Interface see {manual(c-6-1)}. There are two basic ways of getting to information in the help system. The first is via a series of menus which corresponds to the hierarchy of parts, chapters, sections and subsections in the manual. This method of access is analogous to looking through the Table of Contents sections of the printed document. The second method is by keyword search. This method is analogous to looking in the Index sections of the printed manual. These access methods are described in {manual(g-17-2-3)}. When you install an additional Quintus workstation, products, Sun-ProWindows, DBI or Flex, the help system for that product will be integrated into your current help system.

g-17-1: Help Files

g-17-1-0: Overview

The help system operates by reading help files into a special buffer if you are running under Emacs, or by writing them to the terminal if you are not. There are two types of help files: menu files and text files. If you are using Emacs, restricted and specialized key bindings apply in the windows containing each type of file. For example, if you type a letter such as 'a' which would normally be inserted into the buffer, nothing happens; this is because you are not supposed to make changes to the help file. These key bindings are summarized in {manual(g-17-2)}. The most important key binding is the question mark, which will display the appropriate key-binding summary. After typing a question mark, typing a 'b' will get you back to where you were. The organization and numbering of the help files corresponds directly to the organization and numbering of the printed manual. The text files correspond to leaf nodes of the manual tree; that is, to sections of the manual that have no subdivisions. The menu files correspond to the non-leaf nodes of the tree.

g-17-1-1: Menu Files

A menu file is distinguished by having the string "{menu}" at the end, although this is not displayed if you are viewing the file through Emacs or QUI. A menu consists of a numbered sequence of choices. Each choice has the form

Number - Subject                        {manual(SectionNumber)}



If you are running Prolog without Emacs, you can select a menu choice by typing

| ?- manual(SectionNumber).



where SectionNumber is exactly as shown in the menu. Section numbers are in general of the form

Part-Chapter-Section-Subsection



where Part is the letter representing the appropriate manual tab, and Chapter, Section, and Subsection are numbers which correspond directly to a section in the printed manual. Under Emacs: you will find that a special mode is entered when you are looking at a menu file. See {manual(g-17-2)}, for more information.

g-17-1-2: Text Files

Text files are ordinary ASCII files which correspond directly to sections or subsections in a printed manual. If you are running under Emacs, a special mode is entered when you are looking at a text file which is part of the help system (see {manual(g-17-2-2)}). If you are not using Emacs you will see the string "{text}" at the bottom of the file; this is used purely to distinguish it from a menu file. Occasionally you will see a cross-reference in the text. Cross-references look like (A) in the printed manual, and like (B) in the on-line manual:

...see also section D.1-2-3, page 12          (A)



and

...see also {manual(d.1-2-3)}                 (B)



If you are not using Emacs, then you should type the following goal in order to follow this cross-reference.

| ?- manual('d.1-2-3').



Under Emacs: There is a more convenient way to do this: type 'x' to move the cursor to the front of the cross-reference, then type <Return> to display the cross-referenced text.

g-17-1-3: Displaying help files

The help-system always writes its output to current_output instead of user_output. This makes it possible to redirect information produced by help/[0,1] or manual/[0,1] to a file. For example, to save the documentation on assert/1 in a file called assert.doc, type:

?- tell('assert.doc'), help(assert), told.



Furthermore, if the current_output is the same as user_output (ie. the terminal), then the shell environment variable PAGER is used, if set, to display the information. If PAGER is not set, the default pager, more, is used. Under Emacs: This strategy is not applicable in the Emacs interfaces, which provide their own way of saving displayed text, nor in QUI.

NOTE: All sections of the on-line manual are numbered sequentially as though they were chapters; thus, the numbering scheme of the on-line help system may be different from that of the paper manual. This should present no difficulty. If there is a need to cross-reference between the paper and on-line manual, use the names, rather than the numbers, of the sections in question.

g-17-2: Emacs Commands for Using the Help System

g-17-2-0: Introduction

There are two modes provided for viewing help files, depending on whether the file is a menu file or a text file. The commands available in each of these modes are listed below.

g-17-2-1: Menu Commands

The keys available when viewing a menu file of the help system under Emacs are:

<Space>
Move to the next menu entry (wraps around).
<Delete>
Move to the previous menu entry (wraps around).
<Return>
Select the current menu entry.
b
Move Back to the previous help file viewed.
u
Move Up to the parent menu in the manual hierarchy.
q
Quit the help system.
Control v
Scroll the menu one page forward.
Escape v
Scroll the menu one page backward.

NOTE: If you are viewing this under Emacs, type 'b' to return to where you just were.

g-17-2-2: Text Commands

The keys available when viewing a text file of the help system under Emacs are:

<Space>
Scroll the text one page forward (same as Control v).
<Delete>
Scroll the text one page backward (same as Escape v).
b
Move Back to the previous help file viewed.
u
Move Up to the parent menu in the manual hierarchy.
q
Quit the help system.
x
Move to the next cross-reference in the text.
<Return>
Follow a cross-reference (use after 'x').

NOTE: If you are viewing this under Emacs, type 'b' to return to where you just were.

g-17-2-3: Predicate Summary


Copyright (C) 1997 AI International Ltd
contact: product support sales information