next up previous contents index
Next: 10 Threads Up: $FILE Previous: 8 Question files   Contents   Index

Subsections


9 Help files

9.1 Structure of help files

A help file is divided into subjects. Each subject begins with a ";" and ends when another subject begins, or with the end of the file.

The first line of each subject (after the line containing the single ";") contains the name of the subject, and the remaining lines are the content that will be printed by the command help. For example

- interpcom -> help xyz

will print the content of the subject whose name is xyz. If xyz is not the name of a subject, the names of the subjects beginning with xyz will be printed. If only one subject begins with xyz, its name and its content will be printed.


Example : the beginning of a help file :

;
add
add  obj1  obj2  obj3
This command is used to add two objects. 
Here the objects obj1, obj2 are added and the result is stored in object obj3. 
The objects must have been defined and be of the same type. Their dimensions 
must be the same.
;
assign
assign struc mb_name obj_name
This command assigns the object (or structure) whose name is obj_name to the 
member mb_name of the structure struc.
If the member mb_name is a variable of the expression evaluator, the syntax is 
different :

assign struc mb_name xxx

where xxx is a numerical expression. The name of the variable is the name of 
the structure, followed by _  and by the name of the member.

9.2 Colors in help files

It is possible to add colors to the contents of the subjects of a help file, by typing directly ANSI color codes or by using the tool help_convert. This program will convert help files containing simple color codes into help files containing the corresponding ANSI color codes. The color codes are

$\backslash$0 : black
$\backslash$r : red
$\backslash$g : green
$\backslash$y : yellow
$\backslash$b : blue
$\backslash$m : magenta
$\backslash$l : lightblue
$\backslash$w : white

The program help_convert must be used as follows :

help_convert in_file out_file n

where n is 0 or 1. Here in_file is the preliminary help file containing the colour codes, out_file the final help file with ANSI color codes if n is 1, and with no color codes if n is 0.


Example : the beginning of a help file with color codes :

;
add
\badd  \mobj1  obj2  obj3\0
This command is used to add two objects. 
Here the objects \mobj1\0, \mobj2\0 are added and the result is stored in 
object \mobj3\0. 
The objects must have been defined and be of the same type. Their dimensions 
must be the same.
;
assign
\bassign \mstruc mb_name obj_name\0
This command assigns the object (or structure) whose name is \mobj_name\0 
to the member \mmb_name\0 of the structure \mstruc\0.
If the member \mmb_name\0 is a variable of the expression evaluator, the 
syntax is different :

\bassign \mstruc mb_name xxx\0

where \mxxx\0 is a numerical expression. The name of the variable is the 
name of the structure, followed by _  and by the name of the member.


next up previous contents index
Next: 10 Threads Up: $FILE Previous: 8 Question files   Contents   Index
jmdr 2003-09-13