Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / doc / MHonArc / resources / definevar.html
CommitLineData
86530b38
AT
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML//EN">
2<html>
3<head>
4<title>MHonArc Resources: DEFINEVAR</title>
5</head>
6<body>
7<!--x-rc-nav-->
8<table border=0><tr valign="top">
9<td align="left" width="50%">[Prev:&nbsp;<a href="definederived.html">DEFINEDERIVED</a>]</td><td><nobr>[<a href="../resources.html#definevar">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="defrcfile.html">DEFRCFILE</a>]</td></tr></table>
10<!--/x-rc-nav-->
11<hr>
12<h1>DEFINEVAR</h1>
13
14<!-- *************************************************************** -->
15<hr>
16<h2>Syntax</h2>
17
18<dl>
19
20<dt><strong>Envariable</strong></dt>
21<dd><p>N/A
22</p>
23</dd>
24
25<dt><strong>Element</strong></dt>
26<dd><p>
27<code>&lt;DEFINEVAR&gt;<br></code>
28<var>variable-name</var><br>
29<var>value ...</var><br>
30<code>&lt;/DEFINEVAR&gt;<br></code>
31</p>
32</dd>
33
34<dt><strong>Command-line Option</strong></dt>
35<dd><p><br>
36<code>-definevar </code><var>variable-specification-list</var>
37</p>
38</dd>
39
40</dl>
41
42<!-- *************************************************************** -->
43<hr>
44<h2>Description</h2>
45
46<p>DEFINEVAR is used for creating user-defined resource variables.
47DEFINEVAR can be defined on the command-line or in the resource file.
48</p>
49
50<p>On the command-line, the option is called <code>-definevar</code>
51The following argument after <code>-definevar</code>
52is treated as a variable specification list. The specification list
53is a string containing name/value pairs with the following format: </p>
54
55<p><var>NAME</var><code>=</code><var>VALUE</var></p>
56
57<p>Multiple name/value pairs are separated
58by whitespace.
59If <var>VALUE</var> contains whitespace, then it must be surrounded
60by quotes to prevent the command shell from treating the string
61as multiple arguments.
62Multiple <code>-definevar</code> options can be specified on the
63command-line. This can help reduce the ugliness of specify mutliple
64variable definitions with a single option.
65</p>
66
67<table border=0 cellpadding=4>
68<tr valign=top>
69<td><strong>NOTE</strong></td>
70<td><p>If you intend to include resource variables as part of the
71<var>VALUE</var>, you may need to escape the '$' characters (and possible
72other characters) to
73prevent interpolation by the command shell. See your command
74shell documentation for more information.
75</p>
76</td>
77</tr>
78</table>
79
80<p>In a resource file the &lt;DEFINEVAR&gt; element may occur mutliple times
81to define multiple variables. The first line of the &lt;DEFINEVAR&gt;
82element is the name of the variables. All subsequent lines represent
83the content of the variable. If you do not want
84the last newline of a &lt;DEFINEVAR&gt; element content to be part of
85the defined
86variable content, then specify the <b><tt>chop</tt></b> attribute.
87</p>
88
89<!-- *************************************************************** -->
90<hr>
91<h2>Default Setting</h2>
92
93<p>N/A
94</p>
95
96<!-- *************************************************************** -->
97<hr>
98<h2>Resource Variables</h2>
99
100<p>N/A
101</p>
102
103<!-- *************************************************************** -->
104<hr>
105<h2>Examples</h2>
106
107<p>The following is a simple example of defining a variable to
108represent the base text for the title of an archive:
109</p>
110
111<pre>
112<b>&lt;DefineVar chop&gt;</b>
113MAIN-TITLE
114Comp.lang.perl.misc
115<b>&lt;/DefineVar&gt;</b>
116</pre>
117
118<p>Now, the variable can be refernced as follows:
119</p>
120
121<pre>
122<b>&lt;<a href="ttitle.html">TTitle</a> chop&gt;</b>
123$MAIN-TITLE$ (thread)
124<b>&lt;/TTitle&gt;</b>
125</pre>
126
127<p>If you wanted to use the same resource file for multiple arcvhives
128it may better to define <code>$MAIN-TITLE$</code> on the command-line
129as follows:
130</p>
131
132<pre>
133 % <b>mhonarc -definevar MAIN-TITLE='mhonarc mailing list'</b> ...
134</pre>
135
136<!-- *************************************************************** -->
137<hr>
138<h2>Version</h2>
139
140<p>2.0
141</p>
142
143<!-- *************************************************************** -->
144<hr>
145<h2>See Also</h2>
146
147<p>
148</p>
149
150<!-- *************************************************************** -->
151<hr>
152<!--x-rc-nav-->
153<table border=0><tr valign="top">
154<td align="left" width="50%">[Prev:&nbsp;<a href="definederived.html">DEFINEDERIVED</a>]</td><td><nobr>[<a href="../resources.html#definevar">Resources</a>][<a href="../mhonarc.html">TOC</a>]</nobr></td><td align="right" width="50%">[Next:&nbsp;<a href="defrcfile.html">DEFRCFILE</a>]</td></tr></table>
155<!--/x-rc-nav-->
156<hr>
157<address>
158$Date: 2002/07/27 05:13:10 $ <br>
159<img align="top" src="../monicon.png" alt="">
160<a href="http://www.mhonarc.org/"><strong>MHonArc</strong></a><br>
161Copyright &#169; 1997-1998, <a href="http://www.earlhood.com/">Earl Hood</a>, <a href="mailto:mhonarc@mhonarc.org">mhonarc@mhonarc.org</a><br>
162</address>
163
164</body>
165</html>