Final l3gui(1) version for 0.3.1 release.
[l3full.git] / l3doc / l3.html
blob270e1a472bd20350bf8a8031accb89d0d693673f
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <meta name="generator" content="AsciiDoc 8.2.3" />
7 <style type="text/css">
8 /* Debug borders */
9 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
11 border: 1px solid red;
15 body {
16 margin: 1em 5% 1em 5%;
19 a {
20 color: blue;
21 text-decoration: underline;
23 a:visited {
24 color: fuchsia;
27 em {
28 font-style: italic;
31 strong {
32 font-weight: bold;
35 tt {
36 color: navy;
39 h1, h2, h3, h4, h5, h6 {
40 color: #527bbd;
41 font-family: sans-serif;
42 margin-top: 1.2em;
43 margin-bottom: 0.5em;
44 line-height: 1.3;
47 h1, h2, h3 {
48 border-bottom: 2px solid silver;
50 h2 {
51 padding-top: 0.5em;
53 h3 {
54 float: left;
56 h3 + * {
57 clear: left;
60 div.sectionbody {
61 font-family: serif;
62 margin-left: 0;
65 hr {
66 border: 1px solid silver;
69 p {
70 margin-top: 0.5em;
71 margin-bottom: 0.5em;
74 pre {
75 padding: 0;
76 margin: 0;
79 span#author {
80 color: #527bbd;
81 font-family: sans-serif;
82 font-weight: bold;
83 font-size: 1.1em;
85 span#email {
87 span#revision {
88 font-family: sans-serif;
91 div#footer {
92 font-family: sans-serif;
93 font-size: small;
94 border-top: 2px solid silver;
95 padding-top: 0.5em;
96 margin-top: 4.0em;
98 div#footer-text {
99 float: left;
100 padding-bottom: 0.5em;
102 div#footer-badges {
103 float: right;
104 padding-bottom: 0.5em;
107 div#preamble,
108 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
109 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
110 div.admonitionblock {
111 margin-right: 10%;
112 margin-top: 1.5em;
113 margin-bottom: 1.5em;
115 div.admonitionblock {
116 margin-top: 2.5em;
117 margin-bottom: 2.5em;
120 div.content { /* Block element content. */
121 padding: 0;
124 /* Block element titles. */
125 div.title, caption.title {
126 font-family: sans-serif;
127 font-weight: bold;
128 text-align: left;
129 margin-top: 1.0em;
130 margin-bottom: 0.5em;
132 div.title + * {
133 margin-top: 0;
136 td div.title:first-child {
137 margin-top: 0.0em;
139 div.content div.title:first-child {
140 margin-top: 0.0em;
142 div.content + div.title {
143 margin-top: 0.0em;
146 div.sidebarblock > div.content {
147 background: #ffffee;
148 border: 1px solid silver;
149 padding: 0.5em;
152 div.listingblock {
153 margin-right: 0%;
155 div.listingblock > div.content {
156 border: 1px solid silver;
157 background: #f4f4f4;
158 padding: 0.5em;
161 div.quoteblock > div.content {
162 padding-left: 2.0em;
165 div.attribution {
166 text-align: right;
168 div.verseblock + div.attribution {
169 text-align: left;
172 div.admonitionblock .icon {
173 vertical-align: top;
174 font-size: 1.1em;
175 font-weight: bold;
176 text-decoration: underline;
177 color: #527bbd;
178 padding-right: 0.5em;
180 div.admonitionblock td.content {
181 padding-left: 0.5em;
182 border-left: 2px solid silver;
185 div.exampleblock > div.content {
186 border-left: 2px solid silver;
187 padding: 0.5em;
190 div.verseblock div.content {
191 white-space: pre;
194 div.imageblock div.content { padding-left: 0; }
195 div.imageblock img { border: 1px solid silver; }
196 span.image img { border-style: none; }
198 dl {
199 margin-top: 0.8em;
200 margin-bottom: 0.8em;
202 dt {
203 margin-top: 0.5em;
204 margin-bottom: 0;
205 font-style: italic;
207 dd > *:first-child {
208 margin-top: 0;
211 ul, ol {
212 list-style-position: outside;
214 div.olist2 ol {
215 list-style-type: lower-alpha;
218 div.tableblock > table {
219 border: 3px solid #527bbd;
221 thead {
222 font-family: sans-serif;
223 font-weight: bold;
225 tfoot {
226 font-weight: bold;
229 div.hlist {
230 margin-top: 0.8em;
231 margin-bottom: 0.8em;
233 div.hlist td {
234 padding-bottom: 5px;
236 td.hlist1 {
237 vertical-align: top;
238 font-style: italic;
239 padding-right: 0.8em;
241 td.hlist2 {
242 vertical-align: top;
245 @media print {
246 div#footer-badges { display: none; }
249 div#toctitle {
250 color: #527bbd;
251 font-family: sans-serif;
252 font-size: 1.1em;
253 font-weight: bold;
254 margin-top: 1.0em;
255 margin-bottom: 0.1em;
258 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
259 margin-top: 0;
260 margin-bottom: 0;
262 div.toclevel2 {
263 margin-left: 2em;
264 font-size: 0.9em;
266 div.toclevel3 {
267 margin-left: 4em;
268 font-size: 0.9em;
270 div.toclevel4 {
271 margin-left: 6em;
272 font-size: 0.9em;
274 /* Workarounds for IE6's broken and incomplete CSS2. */
276 div.sidebar-content {
277 background: #ffffee;
278 border: 1px solid silver;
279 padding: 0.5em;
281 div.sidebar-title, div.image-title {
282 font-family: sans-serif;
283 font-weight: bold;
284 margin-top: 0.0em;
285 margin-bottom: 0.5em;
288 div.listingblock div.content {
289 border: 1px solid silver;
290 background: #f4f4f4;
291 padding: 0.5em;
294 div.quoteblock-content {
295 padding-left: 2.0em;
298 div.exampleblock-content {
299 border-left: 2px solid silver;
300 padding-left: 0.5em;
303 /* IE6 sets dynamically generated links as visited. */
304 div#toc a:visited { color: blue; }
305 </style>
306 <script type="text/javascript">
307 /*<![CDATA[*/
308 window.onload = function(){generateToc(2)}
309 /* Author: Mihai Bazon, September 2002
310 * http://students.infoiasi.ro/~mishoo
312 * Table Of Content generator
313 * Version: 0.4
315 * Feel free to use this script under the terms of the GNU General Public
316 * License, as long as you do not remove or alter this notice.
319 /* modified by Troy D. Hanson, September 2006. License: GPL */
320 /* modified by Stuart Rackham, October 2006. License: GPL */
322 function getText(el) {
323 var text = "";
324 for (var i = el.firstChild; i != null; i = i.nextSibling) {
325 if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
326 text += i.data;
327 else if (i.firstChild != null)
328 text += getText(i);
330 return text;
333 function TocEntry(el, text, toclevel) {
334 this.element = el;
335 this.text = text;
336 this.toclevel = toclevel;
339 function tocEntries(el, toclevels) {
340 var result = new Array;
341 var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
342 // Function that scans the DOM tree for header elements (the DOM2
343 // nodeIterator API would be a better technique but not supported by all
344 // browsers).
345 var iterate = function (el) {
346 for (var i = el.firstChild; i != null; i = i.nextSibling) {
347 if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
348 var mo = re.exec(i.tagName)
349 if (mo)
350 result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
351 iterate(i);
355 iterate(el);
356 return result;
359 // This function does the work. toclevels = 1..4.
360 function generateToc(toclevels) {
361 var toc = document.getElementById("toc");
362 var entries = tocEntries(document.getElementsByTagName("body")[0], toclevels);
363 for (var i = 0; i < entries.length; ++i) {
364 var entry = entries[i];
365 if (entry.element.id == "")
366 entry.element.id = "toc" + i;
367 var a = document.createElement("a");
368 a.href = "#" + entry.element.id;
369 a.appendChild(document.createTextNode(entry.text));
370 var div = document.createElement("div");
371 div.appendChild(a);
372 div.className = "toclevel" + entry.toclevel;
373 toc.appendChild(div);
376 /*]]>*/
377 </script>
378 <title>l3(1)</title>
379 </head>
380 <body>
381 <div id="header">
382 <h1>l3(1)</h1>
383 <span id="author">Michael Hohn</span><br />
384 <span id="email"><tt>&lt;<a href="mailto:mhhohn@users.sf.net">mhhohn@users.sf.net</a>&gt;</tt></span><br />
385 <div id="toc">
386 <div id="toctitle">Table of Contents</div>
387 <noscript><p><b>JavaScript must be enabled in your browser to display the table of contents.</b></p></noscript>
388 </div>
389 </div>
390 <h2 id="_name">1. NAME</h2>
391 <div class="sectionbody">
392 <div class="para"><p>l3 - interpret l3 programs</p></div>
393 </div>
394 <h2 id="_synopsis">2. SYNOPSIS</h2>
395 <div class="sectionbody">
396 <div class="para"><p><em>l3</em> [-f FILE] [-l STATE_LOAD] [-s STATE_SAVE] [-i] [-d] [-h]</p></div>
397 </div>
398 <h2 id="_description">3. DESCRIPTION</h2>
399 <div class="sectionbody">
400 <div class="para"><p>The <a href="l3.html">l3(1)</a> command executes <a href="l3lang.html">l3lang(1)</a>
401 scripts in files and provides an interactive toplevel for expression
402 evaluation via <strong>-i</strong>.</p></div>
403 <div class="para"><p>This command-line version is best used for unattended execution; to
404 fully use l3 requires the graphical interface; see
405 <a href="l3gui.html">l3gui(1)</a>.</p></div>
406 <h3 id="_batch_mode">3.1. Batch mode</h3><div style="clear:left"></div>
407 <div class="para"><p>When a FILE argument is present (-f), the FILE is executed. Execution
408 continues until the end-of-file is reached, or an error is
409 encountered. In both cases a state file is produced (either FILE.l3s,
410 or STATE_SAVE from -s) along with whatever output FILE produced.</p></div>
411 <div class="para"><p>When a STATE_LOAD argument is given (-l), the state is loaded. This
412 implicitly loads the script FILE that originally produced STATE_LOAD.
413 Then, this original script is scanned and <strong>new</strong> expressions are
414 executed. Expressions previously executed successfully are <strong>not</strong>
415 executed again. The final state is written back to STATE_LOAD, or
416 STATE_SAVE if -s was given.</p></div>
417 <h3 id="_interactive_mode">3.2. Interactive mode</h3><div style="clear:left"></div>
418 <div class="para"><p>When -i is given, any files specified are executed first, and the
419 toplevel started after. If any error occurs, the error is printed
420 and the toplevel is entered immediately, even if unread files
421 remain.</p></div>
422 <div class="para"><p>Expressions entered at the toplevel are executed immediately. The
423 expressions are appended to the current FILE if present, otherwise
424 they form a new script. On end-of-file, the the state is saved in one
425 of STATE_SAVE, STATE_LOAD, FILE.l3s, or st.l3s (in that order), and
426 the interpreter exits.</p></div>
427 <div class="para"><p>Errors simply cause a return to the toplevel.</p></div>
428 </div>
429 <h2 id="_options">4. OPTIONS</h2>
430 <div class="sectionbody">
431 <div class="vlist"><dl>
432 <dt>
433 &#8212;help, -h
434 </dt>
435 <dd>
437 Print help and exit.
438 </p>
439 </dd>
440 <dt>
441 &#8212;version
442 </dt>
443 <dd>
445 show program's version number and exit
446 </p>
447 </dd>
448 <dt>
449 -h, &#8212;help
450 </dt>
451 <dd>
453 show this help message and exit
454 </p>
455 </dd>
456 <dt>
457 -f FILE, &#8212;file=FILE
458 </dt>
459 <dd>
461 Execute this script in l3.
462 </p>
463 </dd>
464 <dt>
465 -l STATE_LOAD, &#8212;state_load=STATE_LOAD
466 </dt>
467 <dd>
469 Start l3 from this state file.
470 </p>
471 </dd>
472 <dt>
473 -s STATE_SAVE, &#8212;state_save=STATE_SAVE
474 </dt>
475 <dd>
477 Save l3 state to this file.
478 </p>
479 </dd>
480 <dt>
481 -i, &#8212;interactive
482 </dt>
483 <dd>
485 Go to Python console on exit. This allows moving
486 between Python and l3. To restart, use l3.run()
487 </p>
488 </dd>
489 <dt>
490 -d, &#8212;developer
491 </dt>
492 <dd>
494 Import all l3 modules (from &#8230; import *) when using
495 -i. Allows for interactive Python code updates.
496 </p>
497 </dd>
498 </dl></div>
499 </div>
500 <h2 id="_environment">5. ENVIRONMENT</h2>
501 <div class="sectionbody">
502 <div class="para"><p><tt>L3HOME</tt> The path to the l3 installation root.</p></div>
503 </div>
504 <h2 id="_see_also">6. SEE ALSO</h2>
505 <div class="sectionbody">
506 <div class="para"><p><a href="l3lang.html">l3lang(1)</a>,
507 <a href="l3gui.html">l3gui(1)</a>.</p></div>
508 </div>
509 <h2 id="_author">7. AUTHOR</h2>
510 <div class="sectionbody">
511 <div class="para"><p>Michael Hohn, mhhohn@users.sf.net</p></div>
512 </div>
513 <h2 id="_copying">8. COPYING</h2>
514 <div class="sectionbody">
515 <div class="para"><p>Copyright &#169; 2004-8 Lawrence Berkeley National Laboratory</p></div>
516 <div class="para"><p>l3 is released under the BSD license. See license.txt for details.</p></div>
517 </div>
518 <div id="footer">
519 <div id="footer-text">
520 Last updated 2008-04-16 14:40:40 PDT
521 </div>
522 </div>
523 </body>
524 </html>