Final l3gui(1) version for 0.3.1 release.
[l3full.git] / l3doc / l3.txt
blobb9ee0d5f7a7999dded6c023486e29c67ae249636
1 l3(1)
2 =====
3 Michael Hohn <mhhohn@users.sf.net> 
5 NAME
6 ----
7 l3 - interpret l3 programs
9 SYNOPSIS
10 --------
11 'l3' [-f FILE] [-l STATE_LOAD] [-s STATE_SAVE] [-i] [-d] [-h]
14 DESCRIPTION
15 -----------
17 The link:l3.html[l3(1)] command executes link:l3lang.html[l3lang(1)]
18 scripts in files and provides an interactive toplevel for expression
19 evaluation via *-i*.
21 This command-line version is best used for unattended execution; to
22 fully use l3 requires the graphical interface; see
23 link:l3gui.html[l3gui(1)].
25 Batch mode
26 ~~~~~~~~~~
28 When a FILE argument is present (-f), the FILE is executed.  Execution
29 continues until the end-of-file is reached, or an error is
30 encountered.  In both cases a state file is produced (either FILE.l3s,
31 or STATE_SAVE from -s) along with whatever output FILE produced.
33 When a STATE_LOAD argument is given (-l), the state is loaded.  This
34 implicitly loads the script FILE that originally produced STATE_LOAD.
35 Then, this original script is scanned and *new* expressions are
36 executed.  Expressions previously executed successfully are *not*
37 executed again.  The final state is written back to STATE_LOAD, or
38 STATE_SAVE if -s was given.
40 Interactive mode
41 ~~~~~~~~~~~~~~~~
42 When -i is given, any files specified are executed first, and the
43 toplevel started after.  If any error occurs, the error is printed
44 and the toplevel is entered immediately, even if unread files
45 remain. 
47 Expressions entered at the toplevel are executed immediately.  The
48 expressions are appended to the current FILE if present, otherwise
49 they form a new script.  On end-of-file, the the state is saved in one
50 of STATE_SAVE, STATE_LOAD, FILE.l3s, or st.l3s (in that order), and
51 the interpreter exits.
53 Errors simply cause a return to the toplevel.
56 OPTIONS
57 -------
58 --help, -h::
59     Print help and exit.
61 --version::
62     show program's version number and exit
64 -h, --help::
65     show this help message and exit
67 -f FILE, --file=FILE::
68     Execute this script in l3.
70 -l STATE_LOAD, --state_load=STATE_LOAD::
71     Start l3 from this state file.
73 -s STATE_SAVE, --state_save=STATE_SAVE::
74     Save l3 state to this file.
76 -i, --interactive::
77     Go to Python console on exit.  This allows moving
78     between Python and l3.  To restart, use l3.run()
80 -d, --developer::
81     Import all l3 modules (from ... import *)  when using
82     -i.  Allows for interactive Python code updates.
85 ENVIRONMENT
86 -----------
87 `L3HOME`  The path to the l3 installation root. 
90 SEE ALSO
91 --------
92 link:l3lang.html[l3lang(1)], 
93 link:l3gui.html[l3gui(1)].
95 AUTHOR
96 ------
97 Michael Hohn, mhhohn@users.sf.net
99 COPYING
100 -------
101 Copyright (C) 2004-8 Lawrence Berkeley National Laboratory 
103 l3 is released under the BSD license.  See license.txt for details.