MHonArc Resource List

DEFINEVAR


Syntax

Envariable

N/A

Element

<DEFINEVAR>
variable-name
value ...
</DEFINEVAR>

Command-line Option

-definevars variable-specification-list


Description

DEFINEVAR is used for creating user-defined resource variables. DEFINEVAR can be defined on the command-line or in the resource file.

On the command-line, the option is called -definevars (note the 's'). The following argument after -definevars is treated as a variable specification list. The specification list is a string containing name/value pairs with the following format:

NAME=VALUE

If VALUE contains whitespace, then it must be surrounded by single or double quotes. Use single quotes if the VALUE contained double quotes. Use double quotes if the VALUE contains single quotes. Multiple name/value pairs are separated by whitespace.

In a resource file the element may occur mutliple times to define multiple variables. The first line of the <DEFINEVAR> element is the name of the variables. All subsequent lines represent the content of the variable.


Default Setting

N/A


Resource Variables

Variables that are applicable to where user-defined variable is referenced.


Examples

The following is a simple example of defining a variable to represent the base text for the title of an archive:

<DefineVar chop>
MAIN-TITLE
Comp.lang.perl.misc 
</DefineVar>

Now, the variable can be refernced as follows:

<TTitle chop>
$MAIN-TITLE$ (thread)
</TTitle>

If you wanted to use the same resource file for multiple arcvhives it may better to define $MAIN-TITLE$ on the command-line as follows:

    % mhonarc -definevars "MAIN-TITLE='mhonarc mailing list'" ...

Version

2.0


See Also


97/06/03 17:03:58
MHonArc
Copyright © 1997, Earl Hood, ehood@medusa.acs.uci.edu