This file is indexed.

/usr/share/doc/maxima-sage-doc/html/maxima_32.html is in maxima-sage-doc 5.39.0+ds-3.

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
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
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- Created on May, 8 2017 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 5.39.0 Manual: 32. Runtime Environment</title>

<meta name="description" content="Maxima 5.39.0 Manual: 32. Runtime Environment">
<meta name="keywords" content="Maxima 5.39.0 Manual: 32. 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%;
      font-family: "FreeSans", sans-serif}
h1 {font-size: 150%; font-family: "FreeSans", sans-serif}
h2 {font-size: 125%; font-family: "FreeSans", sans-serif}
h3 {font-size: 100%; font-family: "FreeSans", sans-serif}
a[href] {color: rgb(0,0,255); text-decoration: none;}
a[href]:hover {background: rgb(220,220,220);}
div.textbox {border: solid; border-width: thin; 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);}
pre.example {border: 1px solid rgb(180,180,180); padding-top: 1em;
    padding-bottom: 1em; padding-left: 1em; padding-right: 1em;
    background-color: rgb(238,238,255)}
div.spacerbox {border: none; padding-top: 2em; padding-bottom: 2em}
div.image {margin: 0; padding: 1em; text-align: center}
div.categorybox {border: 1px solid gray; padding-top: 0px; padding-bottom: 0px;
    padding-left: 1em; padding-right: 1em; background: rgb(247,242,220)}
img {max-width:80%; max-height: 80%}
-->
</style>

<link rel="icon" href="figures/favicon.ico"/>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="Runtime-Environment"></a>
<a name="SEC176"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="maxima_31.html#SEC175" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC177" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="maxima_31.html#SEC174" title="Beginning of this chapter or previous chapter"> &lt;&lt; </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_33.html#SEC180" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </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_89.html#SEC425" 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"> 32. Runtime Environment </h1>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SEC177">32.1 Introduction for Runtime Environment</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC178">32.2 Interrupts</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">                  
</td></tr>
<tr><td align="left" valign="top"><a href="#SEC179">32.3 Functions and Variables for Runtime Environment</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">  
</td></tr>
</table>

<p><a name="Item_003a-Introduction-for-Runtime-Environment"></a>
</p><hr size="6">
<a name="Introduction-for-Runtime-Environment"></a>
<a name="SEC177"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC176" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC178" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC176" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC176" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_33.html#SEC180" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </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_89.html#SEC425" 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"> 32.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>
<pre class="example">setup_autoload (&quot;specfun.mac&quot;, ultraspherical, assoc_legendre_p);
showtime:all;
</pre>
<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>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Session-management">Session management</a>
</div>
</p>
<p><a name="Item_003a-Interrupts"></a>
</p><hr size="6">
<a name="Interrupts"></a>
<a name="SEC178"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC177" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC179" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC176" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC176" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_33.html#SEC180" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </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_89.html#SEC425" 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"> 32.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 Lisp variable <code>*debugger-hook*</code> is set to <code>nil</code>, by executing
</p>
<pre class="example">:lisp (setq *debugger-hook* nil)
</pre>

<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>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Console-interaction">Console interaction</a>
</div>
</p>

<p><a name="Item_003a-Functions-and-Variables-for-Runtime-Environment"></a>
</p><hr size="6">
<a name="Functions-and-Variables-for-Runtime-Environment"></a>
<a name="SEC179"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC178" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_33.html#SEC180" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#SEC176" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SEC176" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="maxima_33.html#SEC180" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </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_89.html#SEC425" 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"> 32.3 Functions and Variables for Runtime Environment </h2>

<p><a name="maxima_005ftempdir"></a>
<a name="Item_003a-maxima_005ftempdir"></a>
</p><dl>
<dt><u>System variable:</u> <b>maxima_tempdir</b>
<a name="IDX1253"></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>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Global-variables">Global variables</a>
</div>
</p></dd></dl>

<p><a name="maxima_005fuserdir"></a>
<a name="Item_003a-maxima_005fuserdir"></a>
</p><dl>
<dt><u>System variable:</u> <b>maxima_userdir</b>
<a name="IDX1254"></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>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Global-variables">Global variables</a>
</div>
</p></dd></dl>

<p><a name="room"></a>
<a name="Item_003a-room"></a>
</p><dl>
<dt><u>Function:</u> <b>room</b><i> &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>room</tt> () &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>room</tt> (true) &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>room</tt> (false)</i>
<a name="IDX1255"></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>

<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Debugging">Debugging</a>
</div>
</p></dd></dl>

<p><a name="sstatus"></a>
<a name="Item_003a-sstatus"></a>
</p><dl>
<dt><u>Function:</u> <b>sstatus</b><i> (<var>keyword</var>, <var>item</var>)</i>
<a name="IDX1256"></a>
</dt>
<dd><p>When <var>keyword</var> is the symbol <code>feature</code>, <var>item</var> is put on the list
of system features.  After <code>sstatus (keyword, item)</code> is executed,
<code>status (feature, item)</code> returns <code>true</code>.  If <var>keyword</var> is the
symbol <code>nofeature</code>, <var>item</var> is deleted from the list of system features.
This can be useful for package writers, to keep track of what features they have
loaded in.
</p>
<p>See also <code><a href="#status">status</a></code>.
</p>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Programming">Programming</a>
</div>
</p></dd></dl>

<p><a name="status"></a>
<a name="Item_003a-status"></a>
</p><dl>
<dt><u>Function:</u> <b>status</b><i> &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>status</tt> (<code>feature</code>) &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>status</tt> (<code>feature</code>, <var>item</var>)</i>
<a name="IDX1257"></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, item)</code> returns <code>true</code> if <var>item</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>item</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, &quot;ansi-cl&quot;)</code>.
</li></ul>

<p>See also <code><a href="#sstatus">sstatus</a></code>.
</p>
<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>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Programming">Programming</a>
</div>
</p></dd></dl>


<p><a name="system"></a>
<a name="Item_003a-system"></a>
</p><dl>
<dt><u>Function:</u> <b>system</b><i> (<var>command</var>)</i>
<a name="IDX1258"></a>
</dt>
<dd><p>Executes <var>command</var> as a separate process.  The command is passed to the
default shell for execution.  <code>system</code> is not supported by all operating
systems, but generally exists in Unix and Unix-like environments.
</p>
<p>Supposing <code>_hist.out</code> is a list of frequencies which you wish to plot as a
bar graph using <code>xgraph</code>.
</p>
<pre class="example">(%i1) (with_stdout(&quot;_hist.out&quot;,
           for i:1 thru length(hist) do (
             print(i,hist[i]))),
       system(&quot;xgraph -bar -brw .7 -nl &lt; _hist.out&quot;));
</pre>
<p>In order to make the plot be done in the background (returning control to
Maxima) and remove the temporary file after it is done do:
</p>
<pre class="example">system(&quot;(xgraph -bar -brw .7 -nl &lt; _hist.out;  rm -f _hist.out)&amp;&quot;)
</pre></dd></dl>

<p><a name="time"></a>
<a name="Item_003a-time"></a>
</p><dl>
<dt><u>Function:</u> <b>time</b><i> (%o1, %o2, %o3, &hellip;)</i>
<a name="IDX1259"></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>, &hellip; 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>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Debugging">Debugging</a>
</div>
</p></dd></dl>

<p><a name="timedate"></a>
<a name="Item_003a-timedate"></a>
</p><dl>
<dt><u>Function:</u> <b>timedate</b><i> &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>timedate</tt> (<var>T</var>, <var>tz_offset</var>)</i>
<a name="IDX1260"></a>
</dt>
<dd><br><p>&nbsp;&nbsp;&nbsp;&nbsp;<tt>timedate</tt> (<var>T</var>)
<br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>timedate</tt> () &nbsp;</p>
<p><code>timedate(<var>T</var>, <var>tz_offset</var>)</code> returns a string
representing the time <var>T</var> in the time zone <var>tz_offset</var>.
The string format is <code>YYYY-MM-DD HH:MM:SS.NNN[+|-]ZZ:ZZ</code>
(using as many digits as necessary to represent the fractional part)
if <var>T</var> has a nonzero fractional part,
or <code>YYYY-MM-DD HH:MM:SS[+|-]ZZ:ZZ</code> if its fractional part is zero.
</p>
<p><var>T</var> measures time, in seconds, since midnight, January 1, 1900,
in the GMT time zone.
</p>
<p><var>tz_offset</var> measures the offset of the time zone, in hours,
east (positive) or west (negative) of GMT.
<var>tz_offset</var> must be an integer, rational, or float between -24 and 24, inclusive.
If <var>tz_offset</var> is not a multiple of 1/60, 
it is rounded to the nearest multiple of 1/60.
</p>
<p><code>timedate(<var>T</var>)</code> is equivalent to <code>timedate(<var>T</var>, <var>tz_offset</var>)</code>
with <var>tz_offset</var> equal to the offset of the local time zone.
</p>
<p><code>timedate()</code> is equivalent to <code>timedate(absolute_real_time())</code>.
That is, it returns the current time in the local time zone.
</p>
<p>Example:
</p>
<p><code>timedate</code> with no argument returns a string representing the current time and date.
</p>
<pre class="example">(%i1) d : timedate ();
(%o1)                      2010-06-08 04:08:09+01:00
(%i2) print (&quot;timedate reports current time&quot;, d) $
timedate reports current time 2010-06-08 04:08:09+01:00
</pre>
<p><code>timedate</code> with an argument returns a string representing the argument.
</p>
<pre class="example">(%i1) timedate (0);
(%o1)                      1900-01-01 01:00:00+01:00
(%i2) timedate (absolute_real_time () - 7*24*3600);
(%o2)                      2010-06-01 04:19:51+01:00
</pre>
<p><code>timedate</code> with optional timezone offset.
</p>
<pre class="example">(%i1) timedate (1000000000, -9.5);
(%o1)               1931-09-09 16:16:40-09:30
</pre>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Time-and-date-functions">Time and date functions</a>
</div>
</p></dd></dl>

<p><a name="parse_005ftimedate"></a>
<a name="Item_003a-parse_005ftimedate"></a>
</p><dl>
<dt><u>Function:</u> <b>parse_timedate</b><i> &nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>parse_timedate</tt> (<var>S</var>)</i>
<a name="IDX1261"></a>
</dt>
<dd><p>Parses a string <var>S</var> representing a date or date and time of day
and returns the number of seconds since midnight, January 1, 1900 GMT.
If there is a nonzero fractional part, the value returned is a rational number,
otherwise, it is an integer.
<code>parse_timedate</code> returns <code>false</code>
if it cannot parse <var>S</var> according to any of the allowed formats.
</p>
<p>The string <var>S</var> must have one of the following formats,
optionally followed by a timezone designation:
</p>
<ul>
<li>
<code>YYYY-MM-DD[ T]hh:mm:ss[,.]nnn</code>
</li><li>
<code>YYYY-MM-DD[ T]hh:mm:ss</code>
</li><li>
<code>YYYY-MM-DD</code>
</li></ul>

<p>where the fields are year, month, day, hours, minutes, seconds, and fraction of a second,
and square brackets indicate acceptable alternatives.
The fraction may contain one or more digits.
</p>
<p>Except for the fraction of a second,
each field must have exactly the number of digits indicated:
four digits for the year, and two for the month, day of the month, hours, minutes, and seconds.
</p>
<p>A timezone designation must have one of the following forms:
</p>
<ul>
<li>
<code>[+-]hh:mm</code>
</li><li>
<code>[+-]hhmm</code>
</li><li>
<code>[+-]hh</code>
</li><li>
<code>Z</code>
</li></ul>

<p>where <code>hh</code> and <code>mm</code> indicate hours and minutes east (<code>+</code>) or west (<code>-</code>) of GMT.
The timezone may be from +24 hours (inclusive) to -24 hours (inclusive).
</p>
<p>A literal character <code>Z</code> is equivalent to <code>+00:00</code> and its variants,
indicating GMT.
</p>
<p>If no timezone is indicated,
the time is assumed to be in the local time zone.
</p>
<p>Any leading or trailing whitespace (space, tab, newline, and carriage return) is ignored,
but any other leading or trailing characters cause <code>parse_timedate</code> to fail and return <code>false</code>.
</p>
<p>See also <code><a href="#timedate">timedate</a></code> and <code><a href="#absolute_005freal_005ftime">absolute_real_time</a></code>.
</p>
<p>Examples:
</p>
<p>Midnight, January 1, 1900, in the local time zone, in each acceptable format.
The result is the number of seconds the local time zone
is ahead (negative result) or behind (positive result) GMT.
In this example, the local time zone is 8 hours behind GMT.
</p>
<pre class="example">(%i1) parse_timedate (&quot;1900-01-01 00:00:00,000&quot;);
(%o1)                         28800
(%i2) parse_timedate (&quot;1900-01-01 00:00:00.000&quot;);
(%o2)                         28800
(%i3) parse_timedate (&quot;1900-01-01T00:00:00,000&quot;);
(%o3)                         28800
(%i4) parse_timedate (&quot;1900-01-01T00:00:00.000&quot;);
(%o4)                         28800
(%i5) parse_timedate (&quot;1900-01-01 00:00:00&quot;);
(%o5)                         28800
(%i6) parse_timedate (&quot;1900-01-01T00:00:00&quot;);
(%o6)                         28800
(%i7) parse_timedate (&quot;1900-01-01&quot;);
(%o7)                         28800
</pre>
<p>Midnight, January 1, 1900, GMT, in different indicated time zones.
</p>
<pre class="example">(%i1) parse_timedate (&quot;1900-01-01 19:00:00+19:00&quot;);
(%o1)                           0
(%i2) parse_timedate (&quot;1900-01-01 07:00:00+07:00&quot;);
(%o2)                           0
(%i3) parse_timedate (&quot;1900-01-01 01:00:00+01:00&quot;);
(%o3)                           0
(%i4) parse_timedate (&quot;1900-01-01Z&quot;);
(%o4)                           0
(%i5) parse_timedate (&quot;1899-12-31 21:00:00-03:00&quot;);
(%o5)                           0
(%i6) parse_timedate (&quot;1899-12-31 13:00:00-11:00&quot;);
(%o6)                           0
(%i7) parse_timedate (&quot;1899-12-31 08:00:00-16:00&quot;);
(%o7)                           0
</pre>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Time-and-date-functions">Time and date functions</a>
</div>
</p></dd></dl>

<p><a name="absolute_005freal_005ftime"></a>
<a name="Item_003a-absolute_005freal_005ftime"></a>
</p><dl>
<dt><u>Function:</u> <b>absolute_real_time</b><i> ()</i>
<a name="IDX1262"></a>
</dt>
<dd><p>Returns the number of seconds since midnight, January 1, 1900 GMT.
The return value is an integer.
</p>
<p>See also <code><a href="#elapsed_005freal_005ftime">elapsed_real_time</a></code> and <code><a href="#elapsed_005frun_005ftime">elapsed_run_time</a></code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) absolute_real_time ();
(%o1)                      3385045277
(%i2) 1900 + absolute_real_time () / (365.25 * 24 * 3600);
(%o2)                   2007.265612087104
</pre>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Time-and-date-functions">Time and date functions</a>
</div>
</p></dd></dl>

<p><a name="elapsed_005freal_005ftime"></a>
<a name="Item_003a-elapsed_005freal_005ftime"></a>
</p><dl>
<dt><u>Function:</u> <b>elapsed_real_time</b><i> ()</i>
<a name="IDX1263"></a>
</dt>
<dd><p>Returns the number of seconds (including fractions of a second)
since Maxima was most recently started or restarted.
The return value is a floating-point number.
</p>
<p>See also <code><a href="#absolute_005freal_005ftime">absolute_real_time</a></code> and <code><a href="#elapsed_005frun_005ftime">elapsed_run_time</a></code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) elapsed_real_time ();
(%o1)                       2.559324
(%i2) expand ((a + b)^500)$
(%i3) elapsed_real_time ();
(%o3)                       7.552087
</pre>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Time-and-date-functions">Time and date functions</a>
</div>
</p></dd></dl>

<p><a name="elapsed_005frun_005ftime"></a>
<a name="Item_003a-elapsed_005frun_005ftime"></a>
</p><dl>
<dt><u>Function:</u> <b>elapsed_run_time</b><i> ()</i>
<a name="IDX1264"></a>
</dt>
<dd><p>Returns an estimate of the number of seconds (including fractions of a second)
which Maxima has spent in computations since Maxima was most recently started
or restarted.  The return value is a floating-point number.
</p>
<p>See also <code><a href="#absolute_005freal_005ftime">absolute_real_time</a></code> and <code><a href="#elapsed_005freal_005ftime">elapsed_real_time</a></code>.
</p>
<p>Example:
</p>
<pre class="example">(%i1) elapsed_run_time ();
(%o1)                         0.04
(%i2) expand ((a + b)^500)$
(%i3) elapsed_run_time ();
(%o3)                         1.26
</pre>
<div class=categorybox>

<p>Categories:&nbsp;&nbsp;<a href="maxima_105.html#Category_003a-Time-and-date-functions">Time and date functions</a>
</div>
</p></dd></dl>


<p><a name="Item_003a-Miscellaneous-Options"></a>
</p><hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SEC176" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="maxima_33.html#SEC180" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </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_89.html#SEC425" 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>Build Daemon user</em> on <em>May, 8 2017</em> using <a href="http://texi2html.cvshome.org/"><em>texi2html 1.76</em></a>.
 </font>
 <br>

</p>
</body>
</html>