/usr/share/doc/racket/reference/running-sa.html is in racket-doc 6.1-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>18.1 Running Racket or GRacket</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="icons.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_0");">►</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1 </td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2 </td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3 </td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4 </td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5 </td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6 </td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7 </td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8 </td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9 </td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10 </td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11 </td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12 </td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13 </td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14 </td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15 </td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16 </td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17 </td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18 </td><td><a href="running.html" class="tocviewselflink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_1");">▼</a></td><td>18 </td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr></table><div class="tocviewsublist" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">18.1 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Running Racket or GRacket</a></td></tr><tr><td align="right">18.2 </td><td><a href="collects.html" class="tocviewlink" data-pltdoc="x">Libraries and Collections</a></td></tr><tr><td align="right">18.3 </td><td><a href="Interactive_Help.html" class="tocviewlink" data-pltdoc="x">Interactive Help</a></td></tr><tr><td align="right">18.4 </td><td><a href="interactive.html" class="tocviewlink" data-pltdoc="x">Interactive Module Loading</a></td></tr><tr><td align="right">18.5 </td><td><a href="debugging.html" class="tocviewlink" data-pltdoc="x">Debugging</a></td></tr><tr><td align="right">18.6 </td><td><a href="Kernel_Forms_and_Functions.html" class="tocviewlink" data-pltdoc="x">Kernel Forms and Functions</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,"tocview_2");">►</a></td><td>18.1 </td><td><a href="" class="tocviewselflink" data-pltdoc="x">Running Racket or GRacket</a></td></tr></table><div class="tocviewsublistbottom" style="display: none;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">18.1.1 </td><td><a href="#%28part._init-actions%29" class="tocviewlink" data-pltdoc="x">Initialization</a></td></tr><tr><td align="right">18.1.2 </td><td><a href="#%28part._exit-status%29" class="tocviewlink" data-pltdoc="x">Exit Status</a></td></tr><tr><td align="right">18.1.3 </td><td><a href="#%28part._.Init_.Libraries%29" class="tocviewlink" data-pltdoc="x">Init Libraries</a></td></tr><tr><td align="right">18.1.4 </td><td><a href="#%28part._mz-cmdline%29" class="tocviewlink" data-pltdoc="x">Command Line</a></td></tr><tr><td align="right">18.1.5 </td><td><a href="#%28part._configure-runtime%29" class="tocviewlink" data-pltdoc="x">Language Run-<wbr></wbr>Time Configuration</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><span class="tocsublinknumber">18.1.1<tt> </tt></span><a href="#%28part._init-actions%29" class="tocsubseclink" data-pltdoc="x">Initialization</a></td></tr><tr><td><span class="tocsublinknumber">18.1.2<tt> </tt></span><a href="#%28part._exit-status%29" class="tocsubseclink" data-pltdoc="x">Exit Status</a></td></tr><tr><td><span class="tocsublinknumber">18.1.3<tt> </tt></span><a href="#%28part._.Init_.Libraries%29" class="tocsubseclink" data-pltdoc="x">Init Libraries</a></td></tr><tr><td><span class="tocsublinknumber">18.1.4<tt> </tt></span><a href="#%28part._mz-cmdline%29" class="tocsubseclink" data-pltdoc="x">Command Line</a></td></tr><tr><td><span class="tocsublinknumber">18.1.5<tt> </tt></span><a href="#%28part._configure-runtime%29" class="tocsubseclink" data-pltdoc="x">Language Run-<wbr></wbr>Time Configuration</a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="running.html" title="backward to "18 Running Racket"" data-pltdoc="x">← prev</a> <a href="running.html" title="up to "18 Running Racket"" data-pltdoc="x">up</a> <a href="collects.html" title="forward to "18.2 Libraries and Collections"" data-pltdoc="x">next →</a></span> </div><h4 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""running-sa"">18.1<tt> </tt><a name="(part._running-sa)"></a>Running Racket or GRacket</h4><p>The core Racket run-time system is available in two main variants:</p><ul><li><p>Racket, which provides the primitives libraries on which
<a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> is implemented. On Unix and Mac
OS X, the executable is called
<a name="(idx._(gentag._365._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">racket</span>. On Windows, the executable is
called <a name="(idx._(gentag._366._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">Racket.exe</span>.</p></li><li><p>GRacket, which is a GUI variant of <span class="stt">racket</span> to the degree
that the system distinguishes them. On Unix, the executable
is called <a name="(idx._(gentag._367._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">gracket</span>, and single-instance flags
and X11-related flags are handled and communicated specially to
the <span class="RktSym">racket/gui/base</span> library. On Windows, the
executable is called <a name="(idx._(gentag._368._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">GRacket.exe</span>, and it is a
GUI application (as opposed to a console application) that
implements singe-instance support. On Mac OS X, the
<span class="stt">gracket</span> script launches <a name="(idx._(gentag._369._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">GRacket.app</span>.</p></li></ul><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""init-actions"">18.1.1<tt> </tt><a name="(part._init-actions)"></a>Initialization</h5><p>On start-up, the top-level environment contains no bindings—<wbr></wbr>not even
<span class="RktSym"><a href="application.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25app%29%29" class="RktStxLink" data-pltdoc="x">#%app</a></span> for function application. Primitive modules with names
that start with <span class="RktSym">#%</span> are defined, but they are not meant
for direct use, and the set of such modules can change. For example,
the <a name="(idx._(gentag._370._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">#%kernel</span> module is eventually used to bootstrap
the implementation of <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a>.</p><p>The first action of Racket or GRacket is to initialize
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> to the result of
<span class="RktPn">(</span><span class="RktSym"><a href="collects.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._find-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">find-library-collection-paths</a></span><span class="stt"> </span><span class="RktVar">pre-extras</span><span class="stt"> </span><span class="RktVar">extras</span><span class="RktPn">)</span>, where
<span class="RktVar">pre-extras</span> is normally <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</a></span> and <span class="RktVar">extras</span>
are extra directory paths provided in order in the command line with
<span class="nobreak"><span class="stt">-S</span></span>/<span class="nobreak"><span class="stt">--search</span></span>. An executable created from the Racket or
GRacket executable can embed paths used as <span class="RktVar">pre-extras</span>.</p><p>Racket and GRacket next <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> <a href="#%28mod-path._racket%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/init</span></a>
and <a href="#%28mod-path._racket%2Fgui%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/gui/init</span></a>, respectively, but only if the
command line does not specify a <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> flag
(<span class="nobreak"><span class="stt">-t</span></span>/<span class="nobreak"><span class="stt">--require</span></span>, <span class="nobreak"><span class="stt">-l</span></span>/<span class="nobreak"><span class="stt">--lib</span></span>, or
<span class="nobreak"><span class="stt">-u</span></span>/<span class="nobreak"><span class="stt">--require-script</span></span>) before any <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span>,
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span>, or read-eval-print-loop flag (<span class="nobreak"><span class="stt">-e</span></span>/<span class="nobreak"><span class="stt">--eval</span></span>,
<span class="nobreak"><span class="stt">-f</span></span>/<span class="nobreak"><span class="stt">--load</span></span>, <span class="nobreak"><span class="stt">-r</span></span>/<span class="nobreak"><span class="stt">--script</span></span>, <span class="nobreak"><span class="stt">-m</span></span>/<span class="nobreak"><span class="stt">--main</span></span>,
or <span class="nobreak"><span class="stt">-i</span></span>/<span class="nobreak"><span class="stt">--repl</span></span>). The initialization library can be changed
with the <span class="nobreak"><span class="stt">-I</span></span> <a href="#%28tech._configuration._option%29" class="techoutside" data-pltdoc="x"><span class="techinside">configuration option</span></a>. The
<span class="RktSym">configure-runtime</span> submodule of the initialization library or the
<span class="RktVal">'</span><span class="RktVal">configure-runtime</span> property of the initialization library’s
language is used before the library is instantiated; see
<a href="#%28part._configure-runtime%29" data-pltdoc="x">Language Run-Time Configuration</a>.</p><p>After potentially loading the initialization module, expression
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span>s, files <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span>s, and module <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s are
executed in the order that they are provided on the command line. If
any raises an uncaught exception, then the remaining <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span>s,
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span>s, and <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s are skipped. If the first
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> precedes any <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span> or <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span> so that
the initialization library is skipped, then the <span class="RktSym">configure-runtime</span>
submodule of the required module or the
<span class="RktVal">'</span><span class="RktVal">configure-runtime</span> property of the required module’s library
language is used before the module is instantiated; see
<a href="#%28part._configure-runtime%29" data-pltdoc="x">Language Run-Time Configuration</a>.</p><p>After running all command-line expressions, files, and modules,
Racket or GRacket then starts a read-eval-print loop for interactive
evaluation if no command line flags are provided other than
<a href="#%28tech._configuration._option%29" class="techoutside" data-pltdoc="x"><span class="techinside">configuration options</span></a>. If any command-line argument is
provided that is not a <a href="#%28tech._configuration._option%29" class="techoutside" data-pltdoc="x"><span class="techinside">configuration option</span></a>, then the
read-eval-print-loop is not started, unless the <span class="nobreak"><span class="stt">-i</span></span>/<span class="nobreak"><span class="stt">--repl</span></span>
flag is provided on the command line to
specifically re-enable it. In addition, just before the command line
is started, Racket loads the file <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">init-file</span><span class="RktPn">)</span> and GRacket loads the file
<span class="RktPn">(</span><span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._find-graphical-system-path%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">find-graphical-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">init-file</span><span class="RktPn">)</span> is loaded, unless the
<span class="nobreak"><span class="stt">-q</span></span>/<span class="nobreak"><span class="stt">--no-init-file</span></span> flag is specified on the command line.</p><p>Finally, before Racket or GRacket exits, it calls the procedure that
is the current value of <span class="RktSym"><a href="Exiting.html#%28def._%28%28quote._~23~25kernel%29._executable-yield-handler%29%29" class="RktValLink" data-pltdoc="x">executable-yield-handler</a></span> in the main
thread, unless the <span class="nobreak"><span class="stt">-V</span></span>/<span class="nobreak"><span class="stt">--no-yield</span></span> command-line flag is
specified. Requiring <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=index.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/base</span></a> sets this parameter call
<span class="RktPn">(</span><span class="RktSym">racket</span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">yield</span><span class="RktPn">)</span>.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""exit-status"">18.1.2<tt> </tt><a name="(part._exit-status)"></a>Exit Status</h5><p>The default exit status for a Racket or GRacket process is non-zero if
an error occurs during a command-line <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span> (via <span class="nobreak"><span class="stt">-e</span></span>,
etc.), <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span> (via <span class="nobreak"><span class="stt">-f</span></span>, <span class="nobreak"><span class="stt">-r</span></span>, etc.), or
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> (via <span class="nobreak"><span class="stt">--l</span></span>, <span class="nobreak"><span class="stt">-t</span></span>, etc.), but only when no
read-eval-print loop is started. Otherwise, the default exit status is
<span class="RktVal">0</span>.</p><p>In all cases, a call to <span class="RktSym"><a href="Exiting.html#%28def._%28%28quote._~23~25kernel%29._exit%29%29" class="RktValLink" data-pltdoc="x">exit</a></span> (when the default <a href="Exiting.html#%28tech._exit._handler%29" class="techoutside" data-pltdoc="x"><span class="techinside">exit
handler</span></a> is in place) can end the process with a specific status
value.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""Init_Libraries"">18.1.3<tt> </tt><a name="(part._.Init_.Libraries)"></a><a name="(mod-path._racket/init)"></a><a name="(mod-path._racket/gui/init)"></a><a name="(mod-path._racket/language-info)"></a><a name="(mod-path._racket/runtime-config)"></a>Init Libraries</h5><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/init</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The <a href="#%28mod-path._racket%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/init</span></a>
library is the default start-up library for Racket. It re-exports
the <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a>, <a href="interactive.html#%28mod-path._racket%2Fenter%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/enter</span></a> and
<a href="Interactive_Help.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/help</span></a> libraries, and it sets
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-print%29%29" class="RktValLink" data-pltdoc="x">current-print</a></span> to use <span class="RktSym"><a href="pretty-print.html#%28def._%28%28lib._racket%2Fpretty..rkt%29._pretty-print%29%29" class="RktValLink" data-pltdoc="x">pretty-print</a></span>.</div></p><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Fgui%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/gui/init</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">gui-lib</span></span></td></tr></table></div><div class="SIntrapara">The
<a href="#%28mod-path._racket%2Fgui%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/gui/init</span></a> library is the default start-up
library for GRacket. It re-exports the <a href="#%28mod-path._racket%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/init</span></a> and
<a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=index.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/base</span></a> libraries, and it sets
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-load%29%29" class="RktValLink" data-pltdoc="x">current-load</a></span> to use <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=Editor_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._text-editor-load-handler%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">text-editor-load-handler</a></span>.</div></p><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Flanguage-info%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/language-info</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The
<a href="#%28mod-path._racket%2Flanguage-info%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/language-info</span></a> library provides a
<span class="RktSym">get-info</span> function that takes any value and returns
another function; the returned function takes a key value and a
default value, and it returns <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">racket/runtime-config</span><span class="stt"> </span><span class="RktVal">configure</span><span class="stt"> </span><span class="RktVal">#f</span><span class="RktVal">)</span><span class="RktVal">)</span> if the key is <span class="RktVal">'</span><span class="RktVal">configure-runtime</span> or the
default value otherwise.</div></p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span>See also <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=module-runtime-config.html&version=6.1" class="Sq" data-pltdoc="x">Module-Handling Configuration</a> in <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=index.html&version=6.1" class="Sq" data-pltdoc="x"><span style="font-weight: bold">The Racket Guide</span></a>.</p></blockquote></blockquote></blockquote><p>The vector <span class="RktVal">'</span><span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">racket/language-info</span><span class="stt"> </span><span class="RktVal">get-info</span><span class="stt"> </span><span class="RktVal">#f</span><span class="RktVal">)</span> is suitable
for attaching to a module as its language info to get the same
language information as the <span class="RktSym">racket/base</span> language.</p><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="#%28mod-path._racket%2Fruntime-config%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/runtime-config</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller"> package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The
<a href="#%28mod-path._racket%2Fruntime-config%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/runtime-config</span></a> library provides a
<span class="RktSym">configure</span> function that takes any value
and sets <span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._print-as-expression%29%29" class="RktValLink" data-pltdoc="x">print-as-expression</a></span>
to <span class="RktVal">#t</span>.</div></p><p>The vector <span class="RktVal">#</span><span class="RktVal">(</span><span class="RktVal">racket/runtime-config</span><span class="stt"> </span><span class="RktVal">configure</span><span class="stt"> </span><span class="RktVal">#f</span><span class="RktVal">)</span> is suitable
as a member of a list of runtime-configuration specification (as
returned by a module’s language-information function for the key
<span class="RktVal">'</span><span class="RktVal">configure-runtime</span>) to obtain the same runtime configuration as
for the <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> language.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""mz-cmdline"">18.1.4<tt> </tt><a name="(part._mz-cmdline)"></a>Command Line</h5><p>The Racket and GRacket executables recognize the following command-line
flags:</p><ul><li><p>File and expression options:</p><ul><li><p><a name="(idx._(gentag._371._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-e</span></span> <span class="sroman">‹<span style="font-style: italic">expr</span>›</span> or <a name="(idx._(gentag._372._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--eval</span></span>
<span class="sroman">‹<span style="font-style: italic">expr</span>›</span> : <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval%29%29" class="RktValLink" data-pltdoc="x">eval</a></span>s <span class="sroman">‹<span style="font-style: italic">expr</span>›</span>. The results of
the evaluation are printed via <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-print%29%29" class="RktValLink" data-pltdoc="x">current-print</a></span>.</p></li><li><p><a name="(idx._(gentag._373._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-f</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._374._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--load</span></span>
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span>s <span class="sroman">‹<span style="font-style: italic">file</span>›</span>; if
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> is <span class="stt">"-"</span>, then expressions are read and
evaluated from standard input.</p></li><li><p><a name="(idx._(gentag._375._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-t</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._376._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--require</span></span>
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="sroman">‹<span style="font-style: italic">file</span>›</span>, and then
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._submod%29%29" class="RktStxLink" data-pltdoc="x">submod</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._file%29%29" class="RktStxLink" data-pltdoc="x">file</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">file</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym">main</span><span class="RktPn">)</span> if available.</p></li><li><p><a name="(idx._(gentag._377._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-l</span></span> <span class="sroman">‹<span style="font-style: italic">path</span>›</span> or <a name="(idx._(gentag._378._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--lib</span></span>
<span class="sroman">‹<span style="font-style: italic">path</span>›</span> : <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">path</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span>, and then <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s
<span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._submod%29%29" class="RktStxLink" data-pltdoc="x">submod</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">path</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym">main</span><span class="RktPn">)</span> if available.</p></li><li><p><a name="(idx._(gentag._379._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-p</span></span> <span class="sroman">‹<span style="font-style: italic">package</span>›</span> :
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._planet%29%29" class="RktStxLink" data-pltdoc="x">planet</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">package</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span>,
and then
<span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._submod%29%29" class="RktStxLink" data-pltdoc="x">submod</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._planet%29%29" class="RktStxLink" data-pltdoc="x">planet</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">package</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktSym">main</span><span class="RktPn">)</span> if available.</p></li><li><p><a name="(idx._(gentag._380._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-r</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._381._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--script</span></span>
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._load%29%29" class="RktValLink" data-pltdoc="x">load</a></span>s <span class="sroman">‹<span style="font-style: italic">file</span>›</span>
<span class="refelem"><span class="refcolumn"><span class="refcontent">Despite its name, <span class="nobreak"><span class="stt">--script</span></span> is not usually
used for Unix scripts. See <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=scripts.html&version=6.1" class="Sq" data-pltdoc="x">Scripts</a> for more
information on scripts.</span></span></span>
as a script. This flag is like <span class="nobreak"><span class="stt">-t</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> plus
<span class="nobreak"><span class="stt">-N</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> to set the program name and <span class="nobreak"><span class="stt">--</span></span>
to cause all further command-line elements to be treated as
non-flag arguments.</p></li><li><p><a name="(idx._(gentag._382._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-u</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._383._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--require-script</span></span>
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span>s <span class="sroman">‹<span style="font-style: italic">file</span>›</span> as a script;
This flag is like <span class="nobreak"><span class="stt">-t</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> plus <span class="nobreak"><span class="stt">-N</span></span>
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> to set the program name and <span class="nobreak"><span class="stt">--</span></span> to cause
all further command-line elements to be treated as non-flag
arguments.</p></li><li><p><a name="(idx._(gentag._384._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-k</span></span> <span class="sroman">‹<span style="font-style: italic">n</span>›</span> <span class="sroman">‹<span style="font-style: italic">m</span>›</span> <span class="sroman">‹<span style="font-style: italic">p</span>›</span> : Loads code
embedded in the executable from file position <span class="sroman">‹<span style="font-style: italic">n</span>›</span> to
<span class="sroman">‹<span style="font-style: italic">m</span>›</span> and from <span class="sroman">‹<span style="font-style: italic">m</span>›</span> to <span class="sroman">‹<span style="font-style: italic">p</span>›</span>. (On Mac OS X,
<span class="sroman">‹<span style="font-style: italic">n</span>›</span>, <span class="sroman">‹<span style="font-style: italic">m</span>›</span>, and <span class="sroman">‹<span style="font-style: italic">p</span>›</span> are relative to a
<span class="stt">__PLTSCHEME</span> segment in the executable.) The first range
is loaded in every new <a href="places.html#%28tech._place%29" class="techoutside" data-pltdoc="x"><span class="techinside">place</span></a>, and any modules declared
in that range are considered predefined in the sense of
<span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-predefined~3f%29%29" class="RktValLink" data-pltdoc="x">module-predefined?</a></span>. This option is normally embedded
in a stand-alone binary that also embeds Racket code.</p></li><li><p><a name="(idx._(gentag._385._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-m</span></span> or <a name="(idx._(gentag._386._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--main</span></span> : Evaluates a call to
<span class="RktSym">main</span> as bound in the top-level environment. All
of the command-line arguments that are not processed as
options (i.e., the arguments put into
<span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._current-command-line-arguments%29%29" class="RktValLink" data-pltdoc="x">current-command-line-arguments</a></span>) are passed as
arguments to <span class="RktSym">main</span>. The results of the call are
printed via <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-print%29%29" class="RktValLink" data-pltdoc="x">current-print</a></span>.</p><p>The call to <span class="RktSym">main</span> is constructed as an
expression <span class="RktPn">(</span><span class="RktSym">main</span><span class="stt"> </span><span class="RktVar">arg-str</span><span class="stt"> </span><span class="RktSym"><a href="stx-patterns.html#%28form._%28%28lib._racket%2Fprivate%2Fstxcase-scheme..rkt%29._......%29%29" class="RktStxLink" data-pltdoc="x">...</a></span><span class="RktPn">)</span> where the lexical context of the expression gives
<span class="RktSym">#%app</span> and <span class="RktSym">#%datum</span> bindings as
<span class="RktSym"><a href="application.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25plain-app%29%29" class="RktStxLink" data-pltdoc="x">#%plain-app</a></span> and <span class="RktSym"><a href="quote.html#%28form._%28%28quote._~23~25kernel%29._~23~25datum%29%29" class="RktStxLink" data-pltdoc="x">#%datum</a></span>, but the lexical
context of <span class="RktSym">main</span> is the top-level environment.</p></li></ul></li><li><p>Interaction options:</p><ul><li><p><a name="(idx._(gentag._387._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-i</span></span> or <a name="(idx._(gentag._388._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--repl</span></span> : Runs an interactive read-eval-print
loop, using either <span class="RktSym"><a href="eval.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._read-eval-print-loop%29%29" class="RktValLink" data-pltdoc="x">read-eval-print-loop</a></span> (Racket) or
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._graphical-read-eval-print-loop%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">graphical-read-eval-print-loop</a></span> (GRacket) after showing
<span class="RktPn">(</span><span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._banner%29%29" class="RktValLink" data-pltdoc="x">banner</a></span><span class="RktPn">)</span> and loading <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">init-file</span><span class="RktPn">)</span>. In the case of Racket, <span class="RktPn">(</span><span class="RktSym"><a href="eval.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._read-eval-print-loop%29%29" class="RktValLink" data-pltdoc="x">read-eval-print-loop</a></span><span class="RktPn">)</span>
is followed by <span class="RktPn">(</span><span class="RktSym"><a href="Byte_and_String_Output.html#%28def._%28%28quote._~23~25kernel%29._newline%29%29" class="RktValLink" data-pltdoc="x">newline</a></span><span class="RktPn">)</span>. For GRacket, supply the <span class="nobreak"><span class="stt">-z</span></span>/<span class="nobreak"><span class="stt">--text-repl</span></span>
configuration option to use <span class="RktSym"><a href="eval.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._read-eval-print-loop%29%29" class="RktValLink" data-pltdoc="x">read-eval-print-loop</a></span> (and <span class="RktSym"><a href="Byte_and_String_Output.html#%28def._%28%28quote._~23~25kernel%29._newline%29%29" class="RktValLink" data-pltdoc="x">newline</a></span>)
instead of <span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._graphical-read-eval-print-loop%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">graphical-read-eval-print-loop</a></span>.</p></li><li><p><a name="(idx._(gentag._389._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-n</span></span> or <a name="(idx._(gentag._390._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-lib</span></span> : Skips requiring the
initialization library (i.e., <a href="#%28mod-path._racket%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/init</span></a> or
<a href="#%28mod-path._racket%2Fgui%2Finit%29" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/gui/init</span></a>, unless it is changed with the
<span class="nobreak"><span class="stt">-I</span></span> flag) when not otherwise disabled.</p></li><li><p><a name="(idx._(gentag._391._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-v</span></span> or <a name="(idx._(gentag._392._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--version</span></span> : Shows
<span class="RktPn">(</span><span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._banner%29%29" class="RktValLink" data-pltdoc="x">banner</a></span><span class="RktPn">)</span>.</p></li><li><p><a name="(idx._(gentag._393._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-K</span></span> or <a name="(idx._(gentag._394._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--back</span></span> : GRacket, Mac OS X only;
leave application in the background.</p></li><li><p><a name="(idx._(gentag._395._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-V</span></span> <a name="(idx._(gentag._396._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-yield</span></span> : Skips final
<span class="RktSym"><a href="Exiting.html#%28def._%28%28quote._~23~25kernel%29._executable-yield-handler%29%29" class="RktValLink" data-pltdoc="x">executable-yield-handler</a></span> action, which normally waits until all
frames are closed, etc<span class="Sendabbrev">.</span> in the main <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=windowing-overview.html%23%2528tech._eventspace%2529&version=6.1" class="techoutside Sq" data-pltdoc="x"><span class="techinside">eventspace</span></a> before
exiting for programs that use <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=index.html&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">racket/gui/base</span></a>.</p></li></ul></li><li><p><a name="(tech._configuration._option)"></a><span style="font-style: italic">Configuration options</span>:</p><ul><li><p><a name="(idx._(gentag._397._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-c</span></span> or <a name="(idx._(gentag._398._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-compiled</span></span> : Disables loading
of compiled byte-code <span class="stt">".zo"</span> files, by initializing
<span class="RktSym">current-compiled-file-paths</span> to <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._null%29%29" class="RktValLink" data-pltdoc="x">null</a></span>.
Use judiciously: this effectively ignores the content of all
<span class="stt">"compiled"</span> subdirectories, so that any used modules are
compiled on the fly—<wbr></wbr>even <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> and
its dependencies—<wbr></wbr>which leads to prohibitively expensive
run times.</p></li><li><p><a name="(idx._(gentag._399._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-q</span></span> or <a name="(idx._(gentag._400._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-init-file</span></span> : Skips loading
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">init-file</span><span class="RktPn">)</span> for
<span class="nobreak"><span class="stt">-i</span></span>/<span class="nobreak"><span class="stt">--repl</span></span>.</p></li><li><p><a name="(idx._(gentag._401._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-z</span></span> or <a name="(idx._(gentag._402._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--text-repl</span></span> : GRacket only; changes
<span class="nobreak"><span class="stt">-i</span></span>/<span class="nobreak"><span class="stt">--repl</span></span> to use
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._textual-read-eval-print-loop%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">textual-read-eval-print-loop</a></span> instead of
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._graphical-read-eval-print-loop%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">graphical-read-eval-print-loop</a></span>.</p></li><li><p><a name="(idx._(gentag._403._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-I</span></span> <span class="sroman">‹<span style="font-style: italic">path</span>›</span> : Sets <span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lib%29%29" class="RktStxLink" data-pltdoc="x">lib</a></span><span class="stt"> </span><span class="RktVal">"</span><span class="sroman">‹<span style="font-style: italic">path</span>›</span><span class="RktVal">"</span><span class="RktPn">)</span> as the path to <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span> to initialize
the namespace, unless namespace initialization is disabled. Using
this flag can effectively set the language for the read-eval-print
loop and other top-level evaluation.</p></li><li><p><a name="(idx._(gentag._404._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-X</span></span> <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> or <a name="(idx._(gentag._405._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--collects</span></span>
<span class="sroman">‹<span style="font-style: italic">dir</span>›</span> : Sets <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> as the path to the main
collection of libraries by making <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">collects-dir</span><span class="RktPn">)</span> produce <span class="sroman">‹<span style="font-style: italic">dir</span>›</span>. If <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> is an
empty string, then <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">collects-dir</span><span class="RktPn">)</span>
returns <span class="stt">"."</span>, but
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._current-library-collection-paths%29%29" class="RktValLink" data-pltdoc="x">current-library-collection-paths</a></span> is initialized to
the empty list, and <span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-collection-link-paths%29%29" class="RktValLink" data-pltdoc="x">use-collection-link-paths</a></span> is
initialized to <span class="RktVal">#f</span>.</p></li><li><p><a name="(idx._(gentag._406._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-S</span></span> <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> or <a name="(idx._(gentag._407._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--search</span></span>
<span class="sroman">‹<span style="font-style: italic">dir</span>›</span> : Adds <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> to the default library
collection search path after the main collection directory. If
the <span class="nobreak"><span class="stt">-S</span></span>/<span class="nobreak"><span class="stt">--dir</span></span> flag is supplied multiple times, the
search order is as supplied.</p></li><li><p><a name="(idx._(gentag._408._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-R</span></span> <span class="sroman">‹<span style="font-style: italic">paths</span>›</span> or <a name="(idx._(gentag._409._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--compiled</span></span>
<span class="sroman">‹<span style="font-style: italic">paths</span>›</span> : Sets the initial value of the
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-compiled-file-roots%29%29" class="RktValLink" data-pltdoc="x">current-compiled-file-roots</a></span> parameter, overriding
any <span class="stt">PLTCOMPILEDROOTS</span> setting. The <span class="sroman">‹<span style="font-style: italic">paths</span>›</span>
argument is parsed in the same way as <span class="stt">PLTCOMPILEDROOTS</span>
(see <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-compiled-file-roots%29%29" class="RktValLink" data-pltdoc="x">current-compiled-file-roots</a></span>).</p></li><li><p><a name="(idx._(gentag._410._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-G</span></span> <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> or <a name="(idx._(gentag._411._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--config</span></span>
<span class="sroman">‹<span style="font-style: italic">dir</span>›</span> : Sets the directory that is returned by
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">config-dir</span><span class="RktPn">)</span>.</p></li><li><p><a name="(idx._(gentag._412._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-A</span></span> <span class="sroman">‹<span style="font-style: italic">dir</span>›</span> or <a name="(idx._(gentag._413._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--addon</span></span>
<span class="sroman">‹<span style="font-style: italic">dir</span>›</span> : Sets the directory that is returned by
<span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">addon-dir</span><span class="RktPn">)</span>.</p></li><li><p><a name="(idx._(gentag._414._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-U</span></span> or <a name="(idx._(gentag._415._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-user-path</span></span> : Omits
user-specific paths in the search for collections, C
libraries, etc. by initializing the
<span class="RktSym"><a href="collects.html#%28def._%28%28quote._~23~25kernel%29._use-user-specific-search-paths%29%29" class="RktValLink" data-pltdoc="x">use-user-specific-search-paths</a></span> parameter to
<span class="RktVal">#f</span>.</p></li><li><p><a name="(idx._(gentag._416._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-N</span></span> <span class="sroman">‹<span style="font-style: italic">file</span>›</span> or <a name="(idx._(gentag._417._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--name</span></span>
<span class="sroman">‹<span style="font-style: italic">file</span>›</span> : sets the name of the executable as reported
by <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">run-file</span><span class="RktPn">)</span> to
<span class="sroman">‹<span style="font-style: italic">file</span>›</span>.</p></li><li><p><a name="(idx._(gentag._418._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-J</span></span> <span class="sroman">‹<span style="font-style: italic">name</span>›</span> or <a name="(idx._(gentag._419._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--wm-class</span></span>
<span class="sroman">‹<span style="font-style: italic">name</span>›</span> : GRacket, Unix only; sets the <span class="stt">WM_CLASS</span>
program class to <span class="sroman">‹<span style="font-style: italic">name</span>›</span> (while the <span class="stt">WM_CLASS</span>
program name is derived from the executable name or a
<span class="nobreak"><span class="stt">-N</span></span>/<span class="nobreak"><span class="stt">--name</span></span> argument).</p></li><li><p><a name="(idx._(gentag._420._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-j</span></span> or <a name="(idx._(gentag._421._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-jit</span></span> : Disables the
native-code just-in-time compiler by setting the
<span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._eval-jit-enabled%29%29" class="RktValLink" data-pltdoc="x">eval-jit-enabled</a></span> parameter to <span class="RktVal">#f</span>.</p></li><li><p><a name="(idx._(gentag._422._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-d</span></span> or <a name="(idx._(gentag._423._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--no-delay</span></span> : Disables on-demand
parsing of compiled code and syntax objects by setting the
<span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read-on-demand-source%29%29" class="RktValLink" data-pltdoc="x">read-on-demand-source</a></span> parameter to <span class="RktVal">#f</span>.</p></li><li><p><a name="(idx._(gentag._424._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-b</span></span> or <a name="(idx._(gentag._425._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--binary</span></span> : Requests binary mode,
instead of text mode, for the process’s input, out, and error
ports. This flag currently has no effect, because binary mode
is always used.</p></li><li><p><a name="(idx._(gentag._426._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-W</span></span> <span class="sroman">‹<span style="font-style: italic">levels</span>›</span> or <a name="(idx._(gentag._427._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--warn</span></span>
<span class="sroman">‹<span style="font-style: italic">levels</span>›</span> : Sets the logging level for writing events to
the original error port. The possible <span class="sroman">‹<span style="font-style: italic">level</span>›</span> values
are the same as for the <span class="stt">PLTSTDERR</span> environment
variable. See <a href="logging.html" data-pltdoc="x">Logging</a> for more information.</p></li><li><p><a name="(idx._(gentag._428._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-L</span></span> <span class="sroman">‹<span style="font-style: italic">levels</span>›</span> or <a name="(idx._(gentag._429._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--syslog</span></span>
<span class="sroman">‹<span style="font-style: italic">levels</span>›</span> : Sets the logging level for writing events to
the system log. The possible <span class="sroman">‹<span style="font-style: italic">level</span>›</span> values
are the same as for the <span class="stt">PLTSYSLOG</span> environment
variable. See <a href="logging.html" data-pltdoc="x">Logging</a> for more information.</p></li></ul></li><li><p>Meta options:</p><ul><li><p><a name="(idx._(gentag._430._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--</span></span> : No argument following this flag is itself used
as a flag.</p></li><li><p><a name="(idx._(gentag._431._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-h</span></span> or <a name="(idx._(gentag._432._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">--help</span></span> : Shows information about
the command-line flags and start-up process and exits,
ignoring all other flags.</p></li></ul></li></ul><p>If at least one command-line argument is provided, and if the first
one after any <a href="#%28tech._configuration._option%29" class="techoutside" data-pltdoc="x"><span class="techinside">configuration option</span></a> is not a flag, then a
<span class="nobreak"><span class="stt">-u</span></span>/<span class="nobreak"><span class="stt">--require-script</span></span> flag is implicitly added before the
first non-flag argument.</p><p>If no command-line arguments are supplied other than
<a href="#%28tech._configuration._option%29" class="techoutside" data-pltdoc="x"><span class="techinside">configuration options</span></a>, then the <span class="nobreak"><span class="stt">-i</span></span>/<span class="nobreak"><span class="stt">--repl</span></span> flag is
effectively added.</p><p>For GRacket on Unix, the follow flags are recognized when they appear
at the beginning of the command line, and they count as configuration
options (i.e., they do not disable the read-eval-print loop or prevent
the insertion of <span class="nobreak"><span class="stt">-u</span></span>/<span class="nobreak"><span class="stt">--require-script</span></span>):</p><ul><li><p><a name="(idx._(gentag._433._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-display</span></span> <span class="sroman">‹<span style="font-style: italic">display</span>›</span> : Sets the X11 display
to use.</p></li><li><p><a name="(idx._(gentag._434._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-geometry</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._435._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-bg</span></span>
<span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._436._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-background</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>,
<a name="(idx._(gentag._437._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-fg</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._438._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-foreground</span></span>
<span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._439._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-fn</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._440._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-font</span></span>
<span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._441._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-iconic</span></span>, <a name="(idx._(gentag._442._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-name</span></span>
<span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, <a name="(idx._(gentag._443._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-rv</span></span>, <a name="(idx._(gentag._444._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-reverse</span></span>,
<a name="(idx._(gentag._445._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">+rv</span></span>, <a name="(idx._(gentag._446._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-selectionTimeout</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>,
<a name="(idx._(gentag._447._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-synchronous</span></span>, <a name="(idx._(gentag._448._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-title</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>,
<a name="(idx._(gentag._449._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-xnllanguage</span></span> <span class="sroman">‹<span style="font-style: italic">arg</span>›</span>, or <a name="(idx._(gentag._450._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-xrm</span></span>
<span class="sroman">‹<span style="font-style: italic">arg</span>›</span> : Standard X11 arguments that are mostly ignored
but accepted for compatibility with other X11 programs. The
<span class="nobreak"><span class="stt">-synchronous</span></span> flag behaves in the usual
way.</p></li><li><p><a name="(idx._(gentag._451._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-singleInstance</span></span> : If an existing GRacket is already
running on the same X11 display, if it was started on a
machine with the same hostname, and if it was started with the
same name as reported by <span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._find-system-path%29%29" class="RktValLink" data-pltdoc="x">find-system-path</a></span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">run-file</span><span class="RktPn">)</span>—<wbr></wbr>possibly set with the <span class="nobreak"><span class="stt">-N</span></span>/<span class="nobreak"><span class="stt">--name</span></span>
command-line argument—<wbr></wbr>then all non-option command-line
arguments are treated as filenames and sent to the existing
GRacket instance via the application file handler (see
<span class="RktSym"><a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=gui&rel=Windowing_Functions.html%23%2528def._%2528%2528lib._mred%252Fmain..rkt%2529._application-file-handler%2529%2529&version=6.1" class="RktValLink Sq" data-pltdoc="x">application-file-handler</a></span>).</p></li></ul><p>Similarly, on Mac OS X, a leading switch starting with
<a name="(idx._(gentag._452._(lib._scribblings/reference/reference..scrbl)))"></a><span class="nobreak"><span class="stt">-psn_</span></span> is treated as a special configuration option. It
indicates that Finder started the application, so the current input,
output, and error output are redirected to a GUI window.</p><p>Multiple single-letter switches (the ones preceded by a single
<span class="RktInBG"><span class="hspace"></span><span class="RktIn">-</span><span class="hspace"></span></span>) can be collapsed into a single switch by concatenating
the letters, as long as the first switch is not <span class="nobreak"><span class="stt">--</span></span>. The
arguments for each switch are placed after the collapsed switches (in
the order of the switches). For example,</p><p><span class="hspace"> </span><span class="stt">-ifve </span><span class="sroman">‹<span style="font-style: italic">file</span>›</span><span class="stt"> </span><span class="sroman">‹<span style="font-style: italic">expr</span>›</span></p><p>and</p><p><span class="hspace"> </span><span class="stt">-i -f </span><span class="sroman">‹<span style="font-style: italic">file</span>›</span><span class="stt"> -v -e </span><span class="sroman">‹<span style="font-style: italic">expr</span>›</span></p><p>are equivalent. If a collapsed <span class="nobreak"><span class="stt">--</span></span> appears before other collapsed
switches in the same collapsed set, it is implicitly moved to the end
of the collapsed set.</p><p>Extra arguments following the last option are available from the
<a name="(idx._(gentag._453._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktSym"><a href="runtime.html#%28def._%28%28quote._~23~25kernel%29._current-command-line-arguments%29%29" class="RktValLink" data-pltdoc="x">current-command-line-arguments</a></span> parameter.</p><h5 x-source-module="(lib "scribblings/reference/reference.scrbl")" x-part-tag=""configure-runtime"">18.1.5<tt> </tt><a name="(part._configure-runtime)"></a>Language Run-Time Configuration</h5><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p><span class="imageleft"><img src="finger.png" alt="+" width="24" height="24"/></span>See also <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=module-runtime-config.html&version=6.1" class="Sq" data-pltdoc="x">Module-Handling Configuration</a> in <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=index.html&version=6.1" class="Sq" data-pltdoc="x"><span style="font-weight: bold">The Racket Guide</span></a>.</p></blockquote></blockquote></blockquote><p>A module can have a <span class="RktSym">configure-runtime</span> submodule that is
<span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29" class="RktValLink" data-pltdoc="x">dynamic-require</a></span>d before the module itself when a module is
the main module of a program. Normally, a <span class="RktSym">configure-runtime</span>
submodule is added to a module by the module’s language (i.e., by the
<span class="RktSym"><a href="module.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._~23~25module-begin%29%29" class="RktStxLink" data-pltdoc="x">#%module-begin</a></span> form among a <span class="RktSym"><a href="module.html#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span>’s initial
bindings).</p><p>Alternatively or in addition, an older protocol is in place.
When a module is implemented using <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a>, the language after
<a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a> can specify configuration actions to perform when a
module using the language is the main module of a program. The
language specifies run-time configuration by</p><ul><li><p>attaching a <span class="RktVal">'</span><span class="RktVal">module-language</span> <a href="stxprops.html#%28tech._syntax._property%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax property</span></a> to
the module as read from its source (see <span class="RktSym"><a href="module.html#%28form._%28%28quote._~23~25kernel%29._module%29%29" class="RktStxLink" data-pltdoc="x">module</a></span> and
<span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-compiled-language-info%29%29" class="RktValLink" data-pltdoc="x">module-compiled-language-info</a></span>);</p></li><li><p>having the function indicated by the <span class="RktVal">'</span><span class="RktVal">module-language</span>
<a href="stxprops.html#%28tech._syntax._property%29" class="techoutside" data-pltdoc="x"><span class="techinside">syntax property</span></a> recognize the
<a name="(idx._(gentag._454._(lib._scribblings/reference/reference..scrbl)))"></a><span class="RktVal">'</span><span class="RktVal">configure-runtime</span> key, for which it returns a list of
vectors; each vector must have the form <span class="RktPn">(</span><span class="RktSym"><a href="vectors.html#%28def._%28%28quote._~23~25kernel%29._vector%29%29" class="RktValLink" data-pltdoc="x">vector</a></span><span class="stt"> </span><span class="RktVar">mp</span><span class="stt"> </span><span class="RktVar">name</span><span class="stt"> </span><span class="RktVar">val</span><span class="RktPn">)</span> where <span class="RktVar">mp</span> is a <a href="Module_Names_and_Loading.html#%28tech._module._path%29" class="techoutside" data-pltdoc="x"><span class="techinside">module path</span></a>,
<span class="RktVar">name</span> is a symbol, and <span class="RktVar">val</span> is an arbitrary
value; and</p></li><li><p>having each function called as <span class="RktPn">(</span><span class="RktPn">(</span><span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29" class="RktValLink" data-pltdoc="x">dynamic-require</a></span><span class="stt"> </span><span class="RktVar">mp</span><span class="stt"> </span><span class="RktVar">name</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktVar">val</span><span class="RktPn">)</span> configure the run-time environment, typically by
setting parameters such as <span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-print%29%29" class="RktValLink" data-pltdoc="x">current-print</a></span>.</p></li></ul><p>A <span class="RktVal">'</span><span class="RktVal">configure-runtime</span> query returns a list of vectors, instead
of directly configuring the environment, so that the indicated modules
to be bundled with a program when creating a stand-alone executable;
see <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=raco&rel=exe.html&version=6.1" class="Sq" data-pltdoc="x"><span class="stt">raco exe</span>: Creating Stand-Alone Executables</a> in
<a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=raco&rel=index.html&version=6.1" class="Sq" data-pltdoc="x"><span class="stt">raco</span>: Racket Command-Line Tools</a>.</p><p>For information on defining a new <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&rel=Module_Syntax.html%23%2528part._hash-lang%2529&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktMod">#lang</span></a> language, see
<a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=syntax&rel=reader-helpers.html%23%2528mod-path._syntax%252Fmodule-reader%2529&version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="RktSym">syntax/module-reader</span></a>.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, "6.1", "../");" onfocus="this.style.color="black"; this.style.textAlign="left"; if (this.value == "...search manuals...") this.value="";" onblur="if (this.value.match(/^ *$/)) { this.style.color="#888"; this.style.textAlign="center"; this.value="...search manuals..."; }"/></form> <a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot("6.1");">top</a></span><span class="navright"> <a href="running.html" title="backward to "18 Running Racket"" data-pltdoc="x">← prev</a> <a href="running.html" title="up to "18 Running Racket"" data-pltdoc="x">up</a> <a href="collects.html" title="forward to "18.2 Libraries and Collections"" data-pltdoc="x">next →</a></span> </div></div></div><div id="contextindicator"> </div></body></html>
|