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 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on September, 20 2006 by texi2html 1.76 -->
<!--
Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
Karl Berry <karl@freefriends.org>
Olaf Bachmann <obachman@mathematik.uni-kl.de>
and many others.
Maintained by: Many creative people <dev@texi2html.cvshome.org>
Send bugs and suggestions to <users@texi2html.cvshome.org>
-->
<head>
<title>Maxima Manual: 35. Runtime Environment</title>
<meta name="description" content="Maxima Manual: 35. Runtime Environment">
<meta name="keywords" content="Maxima Manual: 35. Runtime Environment">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.76">
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
body
{
color: black;
background: white;
margin-left: 8%;
margin-right: 13%;
}
h1
{
margin-left: +8%;
font-size: 150%;
font-family: sans-serif
}
h2
{
font-size: 125%;
font-family: sans-serif
}
h3
{
font-size: 100%;
font-family: sans-serif
}
h2,h3,h4,h5,h6 { margin-left: +4%; }
div.textbox
{
border: solid;
border-width: thin;
/* width: 100%; */
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2em;
padding-right: 2em
}
div.titlebox
{
border: none;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2em;
padding-right: 2em;
background: rgb(200,255,255);
font-family: sans-serif
}
div.synopsisbox
{
border: none;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 2em;
padding-right: 2em;
background: rgb(255,220,255);
/*background: rgb(200,255,255); */
/* font-family: fixed */
}
pre.example
{
border: none;
padding-top: 1em;
padding-bottom: 1em;
padding-left: 1em;
padding-right: 1em;
background: rgb(247,242,180); /* kind of sandy */
/* background: rgb(200,255,255); */ /* sky blue */
font-family: "Lucida Console", monospace
}
div.spacerbox
{
border: none;
padding-top: 2em;
padding-bottom: 2em
}
div.image
{
margin: 0;
padding: 1em;
text-align: center;
}
-->
</style>
<link rel="icon" href="http://maxima.sourceforge.net/favicon.ico"/>
</head>
<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Runtime-Environment"></a>
<a name="SEC134"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_34.html#SEC133" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC135" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima_34.html#SEC132" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_36.html#SEC138" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_72.html#SEC264" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h1 class="chapter"> 35. Runtime Environment </h1>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC135">35.1 Introduction for Runtime Environment</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC136">35.2 Interrupts</a></td><td> </td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC137">35.3 Definitions for Runtime Environment</a></td><td> </td><td align="left" valign="top">
</td></tr>
</table>
<hr size="6">
<a name="Introduction-for-Runtime-Environment"></a>
<a name="SEC135"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC134" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC136" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC134" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC134" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_36.html#SEC138" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_72.html#SEC264" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 35.1 Introduction for Runtime Environment </h2>
<p><code>maxima-init.mac</code> is a file which is loaded automatically when Maxima starts.
You can use <code>maxima-init.mac</code> to customize your Maxima environment.
<code>maxima-init.mac</code>, if it exists, is typically placed in the
directory named by <code>maxima_userdir</code>,
although it can be in any directory searched by the function <code>file_search</code>.
</p>
<p>Here is an example <code>maxima-init.mac</code> file:
</p>
<table><tr><td> </td><td><pre class="example">setup_autoload ("specfun.mac", ultraspherical, assoc_legendre_p);
showtime:all;
</pre></td></tr></table>
<p>In this example, <code>setup_autoload</code> tells Maxima to load the
specified file
(<code>specfun.mac</code>) if any of the functions (<code>ultraspherical</code>,
<code>assoc_legendre_p</code>) are called but not yet defined.
Thus you needn't remember to load the file before calling the functions.
</p>
<p>The statement <code>showtime: all</code> tells Maxima to set the <code>showtime</code> variable.
The <code>maxima-init.mac</code> file can contain any other assignments or
other Maxima statements.
</p>
<hr size="6">
<a name="Interrupts"></a>
<a name="SEC136"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC135" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="#SEC137" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC134" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC134" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_36.html#SEC138" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_72.html#SEC264" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 35.2 Interrupts </h2>
<p>The user can stop a time-consuming computation with the
^C (control-C) character.
The default action is to stop the computation
and print another user prompt.
In this case, it is not possible to restart a stopped computation.
</p>
<p>If the variable <code>*debugger-hook*</code> is set to <code>nil</code>, by executing
</p>
<table><tr><td> </td><td><pre class="example">:lisp (setq *debugger-hook* nil)
</pre></td></tr></table>
<p>then upon receiving ^C, Maxima will enter the Lisp debugger,
and the user may use the debugger to inspect the Lisp environment.
The stopped computation can be restarted by entering
<code>continue</code> in the Lisp debugger.
The means of returning to Maxima from the Lisp debugger
(other than running the computation to completion)
is different for each version of Lisp.
</p>
<p>On Unix systems, the character ^Z (control-Z) causes Maxima
to stop altogether, and control is returned to the shell prompt.
The <code>fg</code> command causes Maxima
to resume from the point at which it was stopped.
</p>
<hr size="6">
<a name="Definitions-for-Runtime-Environment"></a>
<a name="SEC137"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC136" title="Previous section in reading order"> < </a>]</td>
<td valign="middle" align="left">[<a href="maxima_36.html#SEC138" title="Next section in reading order"> > </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="#SEC134" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="#SEC134" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_36.html#SEC138" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_72.html#SEC264" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<h2 class="section"> 35.3 Definitions for Runtime Environment </h2>
<dl>
<dt><u>Declaration:</u> <b>feature</b>
<a name="IDX1127"></a>
</dt>
<dd><p>Maxima understands two distinct types of features,
system features and features which apply to mathematical expressions.
See also <code>status</code> for information about system features.
See also <code>features</code> and <code>featurep</code> for information about mathematical features.
</p>
<p><code>feature</code> itself is not the name of a function or variable.
</p>
</dd></dl>
<dl>
<dt><u>Function:</u> <b>featurep</b><i> (<var>a</var>, <var>f</var>)</i>
<a name="IDX1128"></a>
</dt>
<dd><p>Attempts to determine whether the object <var>a</var> has the
feature <var>f</var> on the basis of the facts in the current database. If so,
it returns <code>true</code>, else <code>false</code>.
</p>
<p>Note that <code>featurep</code> returns <code>false</code> when neither <var>f</var>
nor the negation of <var>f</var> can be established.
</p>
<p><code>featurep</code> evaluates its argument.
</p>
<p>See also <code>declare</code> and <code>features</code>.
</p>
<table><tr><td> </td><td><pre class="example">(%i1) declare (j, even)$
(%i2) featurep (j, integer);
(%o2) true
</pre></td></tr></table>
</dd></dl>
<dl>
<dt><u>System variable:</u> <b>maxima_tempdir</b>
<a name="IDX1129"></a>
</dt>
<dd><p><code>maxima_tempdir</code> names the directory in which Maxima creates some temporary files.
In particular, temporary files for plotting are created in <code>maxima_tempdir</code>.
</p>
<p>The initial value of <code>maxima_tempdir</code> is the user's home directory,
if Maxima can locate it; otherwise Maxima makes a guess about a suitable directory.
</p>
<p><code>maxima_tempdir</code> may be assigned a string which names a directory.
</p>
</dd></dl>
<dl>
<dt><u>System variable:</u> <b>maxima_userdir</b>
<a name="IDX1130"></a>
</dt>
<dd><p><code>maxima_userdir</code> names a directory which Maxima searches to find Maxima and Lisp files.
(Maxima searches some other directories as well;
<code>file_search_maxima</code> and <code>file_search_lisp</code> are the complete lists.)
</p>
<p>The initial value of <code>maxima_userdir</code> is a subdirectory of the user's home directory,
if Maxima can locate it; otherwise Maxima makes a guess about a suitable directory.
</p>
<p><code>maxima_userdir</code> may be assigned a string which names a directory.
However, assigning to <code>maxima_userdir</code> does not automatically change
<code>file_search_maxima</code> and <code>file_search_lisp</code>;
those variables must be changed separately.
</p>
</dd></dl>
<dl>
<dt><u>Function:</u> <b>room</b><i> ()</i>
<a name="IDX1131"></a>
</dt>
<dt><u>Function:</u> <b>room</b><i> (true)</i>
<a name="IDX1132"></a>
</dt>
<dt><u>Function:</u> <b>room</b><i> (false)</i>
<a name="IDX1133"></a>
</dt>
<dd><p>Prints out a description of the state of storage and
stack management in Maxima. <code>room</code> calls the Lisp function of
the same name.
</p>
<ul>
<li>
<code>room ()</code> prints out a moderate description.
</li><li>
<code>room (true)</code> prints out a verbose description.
</li><li>
<code>room (false)</code> prints out a terse description.
</li></ul>
</dd></dl>
<dl>
<dt><u>Function:</u> <b>status</b><i> (feature)</i>
<a name="IDX1134"></a>
</dt>
<dt><u>Function:</u> <b>status</b><i> (feature, <var>putative_feature</var>)</i>
<a name="IDX1135"></a>
</dt>
<dt><u>Function:</u> <b>status</b><i> (status)</i>
<a name="IDX1136"></a>
</dt>
<dd><p>Returns information about the presence or absence of certain
system-dependent features.
</p>
<ul>
<li>
<code>status (feature)</code> returns a list of system features.
These include Lisp version, operating system type, etc.
The list may vary from one Lisp type to another.
</li><li> <code>status (feature, <var>putative_feature</var>)</code> returns <code>true</code> if <var>putative_feature</var>
is on the list of items returned by <code>status (feature)</code> and <code>false</code> otherwise.
<code>status</code> quotes the argument <var>putative_feature</var>.
The quote-quote operator <code>''</code> defeats quotation.
A feature whose name contains a special character, such as a hyphen,
must be given as a string argument. For example,
<code>status (feature, "ansi-cl")</code>.
</li><li>
<code>status (status)</code> returns a two-element list <code>[feature, status]</code>.
<code>feature</code> and <code>status</code> are the two arguments accepted by the <code>status</code> function;
it is unclear if this list has additional significance.
</li></ul>
<p>The variable <code>features</code> contains a list of features which apply to
mathematical expressions. See <code>features</code> and <code>featurep</code> for more information.
</p>
</dd></dl>
<dl>
<dt><u>Function:</u> <b>time</b><i> (%o1, %o2, %o3, ...)</i>
<a name="IDX1137"></a>
</dt>
<dd><p>Returns a list of the times, in seconds, taken to compute the output
lines <code>%o1</code>, <code>%o2</code>, <code>%o3</code>, .... The time returned is Maxima's estimate of
the internal computation time, not the elapsed time. <code>time</code> can only
be applied to output line variables; for any other variables, <code>time</code>
returns <code>unknown</code>.
</p>
<p>Set <code>showtime: true</code> to make Maxima print out the computation time
and elapsed time with each output line.
</p>
</dd></dl>
<dl>
<dt><u>Function:</u> <b>timedate</b><i> ()</i>
<a name="IDX1138"></a>
</dt>
<dd><p>Returns a string representing the current time and date.
The string has the format <code>HH:MM:SS Day, mm/dd/yyyy (GMT-n)</code>,
where the fields are
hours, minutes, seconds, day of week, month, day of month, year, and hours different from GMT.
</p>
<p>The return value is a Lisp string.
</p>
<p>Example:
</p>
<table><tr><td> </td><td><pre class="example">(%i1) d: timedate ();
(%o1) 08:05:09 Wed, 11/02/2005 (GMT-7)
(%i2) print ("timedate reports current time", d)$
timedate reports current time 08:05:09 Wed, 11/02/2005 (GMT-7)
</pre></td></tr></table>
</dd></dl>
<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC134" title="Beginning of this chapter or previous chapter"> << </a>]</td>
<td valign="middle" align="left">[<a href="maxima_36.html#SEC138" title="Next chapter"> >> </a>]</td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left"> </td>
<td valign="middle" align="left">[<a href="maxima.html#SEC_Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="maxima_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="maxima_72.html#SEC264" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="maxima_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
<font size="-1">
This document was generated by <em>Robert Dodier</em> on <em>September, 20 2006</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
</font>
<br>
</p>
</body>
</html>
|