User Tools

Site Tools


jvs:cigal:manual:chapter2:help

CIGAL Reference Manual, Chapter 2 (Commands): HELP

HELP -- Print out information about how to use commands

usage: help subject [linenumber] (to print out help information)
or: help { (to put help info. into a macro pgm) }
or: help entrynumber (to print the ENTRYNUMBERth entry in the help file)

The HELP command provides information about CIGAL commands, macros or special topics. The most common usage for the HELP command is:

               help subject

where 'subject' is the topic for which you want information. The nature of the help information varies somewhat depending on the type of subject:

Internal Commands

If SUBJECT is an internal command, HELP prints out a description of what the command does and how it is used. There is a HELP entry for every CIGAL internal command. (Any unambiguous abbreviation can be used for the command name.)

Macro Programs

If SUBJECT is the name of a macro program, HELP reads the macro program and prints out any help information provided within the macro (see below). If no help is present for a particular macro then the HELP command prints nothing. It is up to the person who writes the macro to include some help information with it.

Special Topics

SUBJECT can also be one of a variety of general topics available that provides an overview to different aspects of using CIGAL.

All HELP information on 'internal commands' and 'special topics' is stored in a special format in a single large disk file. The name of this disk file is specified in CIGAL's string variable 'helpfile' (see HELPFILE(4)). This filename is normally initialized automatically by the start-up macro, SYSSTART. HELP information for 'macro programs' is stored within the individual macros themselves (see below).

Rather than specifying each subject by name, you can also get HELP to print information on any topic in the HELP file by simply specifying the entry number as the first argument. Entries in the HELP file are stored in alphabetical order by chapter, so that printing entries in order is a useful way to print the entire manual.

(Note: When calling HELP entries by number the SUBJECT argument must be an explicit number, or an expression that evaluates to a number. For example, 'help 1' or 'help #1+#2' or 'help #1++' will work, but 'help #1' will not because HELP will treat '#1' as a topic name.)

The HELP command and the MANUAL command are essentially identical except that MANUAL prints a header at the top of each page. MANUAL is recommended only when generating a printed manual.

Putting HELP into a macro: Help information is entered into a macro program simply by including a HELP command of the form:

             help {
                Enter whatever help messages you want to include.
                The help message can contain as many lines as you wish.
             }

anywhere within the macro. HELP commands of this form are ignored when the macro is executed. However, when you ask for help for the macro, all lines between the pair of brackets will be printed exactly as they appear. (Note: MANUAL can not be used in place of HELP in this context.)

If HELP can find the specified entry it returns a value 0 in number register 0 (#0); if it cannot find the entry it returns -1 in #0.

For more information, see [INTRODUCTION][0], [MANUAL][2], [HELPFILE][4].

See Also:
HELPFILE(4), INTRODUCTION(0), MANUAL(2)

CIGAL Home, CIGAL Manual, Commands List, Manual Help

jvs/cigal/manual/chapter2/help.txt · Last modified: 2023/02/23 18:43 (external edit)