next up previous contents
Next: Commands Up: Programmer's manual Previous: Adding variables and commands

Variables

1.
Define the name of the new variable in extend.h:
For example #define TOLERANCE_VARNAME "tolerance"
2.
Define its default value:
#define DEFAULT_TOLERANCE 0.5
3.
Declare it as an extern variable:
extern double Tolerance;
4.
``Create'' it with CreatexxxVariable in extend.c:InitExtension, where (xxx) is the desired type. There are macros for several types defined in misc/shell.h.


Werner Scholz
12/19/1997