File: maxima_8.html

package info (click to toggle)
maxima 5.47.0-9
  • links: PTS
  • area: main
  • in suites: forky
  • size: 193,104 kB
  • sloc: lisp: 434,678; fortran: 14,665; tcl: 10,990; sh: 4,577; makefile: 2,763; ansic: 447; java: 328; python: 262; perl: 201; xml: 60; awk: 28; sed: 15; javascript: 2
file content (974 lines) | stat: -rw-r--r-- 50,251 bytes parent folder | download | duplicates (2)
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
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>Maxima 5.47.0 Manual: Functions and Variables for Command Line</title>

<meta name="description" content="Maxima 5.47.0 Manual: Functions and Variables for Command Line">
<meta name="keywords" content="Maxima 5.47.0 Manual: Functions and Variables for Command Line">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="maxima_toc.html#Top" rel="start" title="Top">
<link href="maxima_423.html#Function-and-Variable-Index" rel="index" title="Function and Variable Index">
<link href="maxima_toc.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="maxima_6.html#Command-Line" rel="up" title="Command Line">
<link href="maxima_9.html#Functions-and-Variables-for-Display" rel="next" title="Functions and Variables for Display">
<link href="maxima_7.html#Introduction-to-Command-Line" rel="previous" title="Introduction to Command Line">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.indentedblock {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
div.smalllisp {margin-left: 3.2em}
kbd {font-style:oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:nowrap}
span.nolinebreak {white-space:nowrap}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {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: 1em; padding-bottom: 1em;
    padding-left: 1em; padding-right: 1em; background: rgb(247,242,220)}
img {max-width:80%; max-height: 80%; display: block; margin-left: auto; margin-right: auto}

-->
</style>

<link rel="icon" href="figures/favicon.ico">
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6>"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<a name="Functions-and-Variables-for-Command-Line"></a>
<div class="header">
<p>
Next: <a href="maxima_9.html#Functions-and-Variables-for-Display" accesskey="n" rel="next">Functions and Variables for Display</a>, Previous: <a href="maxima_7.html#Introduction-to-Command-Line" accesskey="p" rel="previous">Introduction to Command Line</a>, Up: <a href="maxima_6.html#Command-Line" accesskey="u" rel="up">Command Line</a> &nbsp; [<a href="maxima_toc.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="maxima_423.html#Function-and-Variable-Index" title="Index" rel="index">Index</a>]</p>
</div>
<a name="Functions-and-Variables-for-Command-Line-1"></a>
<h3 class="section">4.2 Functions and Variables for Command Line</h3>

<a name="g_t_005f_005f"></a><a name="Item_003a-Command_002fdefvr_002f_005f_005f"></a><dl>
<dt><a name="index-_005f_005f"></a>System variable: <strong>__</strong></dt>
<dd>
<p><code>__</code> is the input expression currently being evaluated.  That is, while an
input expression <var>expr</var> is being evaluated, <code>__</code> is <var>expr</var>.
</p>
<p><code>__</code> is assigned the input expression before the input is simplified or
evaluated.  However, the value of <code>__</code> is simplified (but not evaluated)
when it is displayed.
</p>
<p><code>__</code> is recognized by <code><a href="maxima_75.html#batch">batch</a></code> and <code><a href="maxima_75.html#load">load</a></code>.  In a file processed
by <code>batch</code>, <code>__</code> has the same meaning as at the interactive prompt.
In a file processed by <code>load</code>, <code>__</code> is bound to the input expression
most recently entered at the interactive prompt or in a batch file; <code>__</code>
is not bound to the input expressions in the file being processed.  In
particular, when <code>load (<var>filename</var>)</code> is called from the interactive
prompt, <code>__</code> is bound to <code>load (<var>filename</var>)</code> while the file is
being processed.
</p>
<p>See also <code><a href="#g_t_005f">_</a></code> and <code><a href="#g_t_0025">%</a></code>.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) print (&quot;I was called as&quot;, __);
I was called as print(I was called as, __) 
(%o1)              print(I was called as, __)
</pre><pre class="example">(%i2) foo (__);
(%o2)                     foo(foo(__))
</pre><pre class="example">(%i3) g (x) := (print (&quot;Current input expression =&quot;, __), 0);
(%o3) g(x) := (print(&quot;Current input expression =&quot;, __), 0)
</pre><pre class="example">(%i4) [aa : 1, bb : 2, cc : 3];
(%o4)                       [1, 2, 3]
</pre><pre class="example">(%i5) (aa + bb + cc)/(dd + ee + g(x));
                            cc + bb + aa
Current input expression = -------------- 
                           g(x) + ee + dd
                                6
(%o5)                        -------
                             ee + dd
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Global-variables">Global variables</a>
&middot;</div></dd></dl>

<a name="g_t_005f"></a><a name="Item_003a-Command_002fdefvr_002f_005f"></a><dl>
<dt><a name="index-_005f"></a>System variable: <strong>_</strong></dt>
<dd>
<p><code>_</code> is the most recent input expression (e.g., <code>%i1</code>, <code>%i2</code>,
<code>%i3</code>, &hellip;).
</p>
<p><code>_</code> is assigned the input expression before the input is simplified or
evaluated.  However, the value of <code>_</code> is simplified (but not evaluated)
when it is displayed.
</p>
<p><code>_</code> is recognized by <code><a href="maxima_75.html#batch">batch</a></code> and <code><a href="maxima_75.html#load">load</a></code>.  In a file processed
by <code>batch</code>, <code>_</code> has the same meaning as at the interactive prompt.
In a file processed by <code>load</code>, <code>_</code> is bound to the input expression
most recently evaluated at the interactive prompt or in a batch file; <code>_</code>
is not bound to the input expressions in the file being processed.
</p>
<p>See also <code><a href="#g_t_005f_005f">__</a></code> and <code><a href="#g_t_0025">%</a></code>.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) 13 + 29;
(%o1)                          42
</pre><pre class="example">(%i2) :lisp $_
((MPLUS) 13 29)
</pre><pre class="example">(%i2) _;
(%o2)                          42
</pre><pre class="example">(%i3) sin (%pi/2);
(%o3)                           1
</pre><pre class="example">(%i4) :lisp $_
((%SIN) ((MQUOTIENT) $%PI 2))
</pre><pre class="example">(%i4) _;
(%o4)                           1
</pre><pre class="example">(%i5) a: 13$
(%i6) b: 29$
</pre><pre class="example">(%i7) a + b;
(%o7)                          42
</pre><pre class="example">(%i8) :lisp $_
((MPLUS) $A $B)
</pre><pre class="example">(%i8) _;
(%o8)                         b + a
</pre><pre class="example">(%i9) a + b;
(%o9)                          42
</pre><pre class="example">(%i10) ev (_);
(%o10)                         42
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;<a href="maxima_424.html#Category_003a-Global-variables">Global variables</a>
&middot;</div></dd></dl>

<a name="g_t_0025"></a><a name="Item_003a-Command_002fdefvr_002f_0025"></a><dl>
<dt><a name="index-_0025"></a>System variable: <strong>%</strong></dt>
<dd>
<p><code>%</code> is the output expression (e.g., <code>%o1</code>, <code>%o2</code>, <code>%o3</code>,
&hellip;) most recently computed by Maxima, whether or not it was displayed.
</p>
<p><code>%</code> is recognized by <code><a href="maxima_75.html#batch">batch</a></code> and <code><a href="maxima_75.html#load">load</a></code>.  In a file processed
by <code>batch</code>, <code>%</code> has the same meaning as at the interactive prompt.
In a file processed by <code>load</code>, <code>%</code> is bound to the output expression
most recently computed at the interactive prompt or in a batch file; <code>%</code>
is not bound to output expressions in the file being processed.
</p>
<p>See also <code><a href="#g_t_005f">_</a></code>, <code><a href="#g_t_0025_0025">%%</a></code>, and <code><a href="#g_t_0025th">%th</a></code>.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;<a href="maxima_424.html#Category_003a-Global-variables">Global variables</a>
&middot;</div></dd></dl>

<a name="g_t_0025_0025"></a><a name="Item_003a-Command_002fdefvr_002f_0025_0025"></a><dl>
<dt><a name="index-_0025_0025"></a>System variable: <strong>%%</strong></dt>
<dd>
<p>In compound statements, namely <code><a href="maxima_170.html#block">block</a></code>, <code><a href="maxima_170.html#lambda">lambda</a></code>, or
<code>(<var>s_1</var>, ..., <var>s_n</var>)</code>, <code>%%</code> is the value of the previous
statement.
</p>
<p>At the first statement in a compound statement, or outside of a compound
statement, <code>%%</code> is undefined.
</p>
<p><code>%%</code> is recognized by <code><a href="maxima_75.html#batch">batch</a></code> and <code><a href="maxima_75.html#load">load</a></code>, and it has the
same meaning as at the interactive prompt.
</p>
<p>See also <code><a href="#g_t_0025">%</a></code>.
</p>
<p>Examples:
</p>
<p>The following two examples yield the same result.
</p>
<div class="example">
<pre class="example">(%i1) block (integrate (x^5, x), ev (%%, x=2) - ev (%%, x=1));
                               21
(%o1)                          --
                               2
(%i2) block ([prev], prev: integrate (x^5, x),
               ev (prev, x=2) - ev (prev, x=1));
                               21
(%o2)                          --
                               2

</pre></div>

<p>A compound statement may comprise other compound statements.  Whether a
statement be simple or compound, <code>%%</code> is the value of the previous
statement.
</p>
<div class="example">
<pre class="example">(%i3) block (block (a^n, %%*42), %%/6);
                                 n
(%o3)                         7 a
</pre></div>

<p>Within a compound statement, the value of <code>%%</code> may be inspected at a break
prompt, which is opened by executing the <code><a href="maxima_170.html#break">break</a></code> function.  For example,
entering <code>%%;</code> in the following example yields <code>42</code>.
</p>
<div class="example">
<pre class="example">(%i4) block (a: 42, break ())$

Entering a Maxima break point. Type 'exit;' to resume.
_%%;
42
_
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Global-variables">Global variables</a>
&middot;</div></dd></dl>

<a name="g_t_0025th"></a><a name="Item_003a-Command_002fdeffn_002f_0025th"></a><dl>
<dt><a name="index-_0025th"></a>Function: <strong>%th</strong> <em>(<var>i</var>)</em></dt>
<dd><a name="index-N_0027th-previous-output"></a>

<p>The value of the <var>i</var>&rsquo;th previous output expression.  That is, if the next
expression to be computed is the <var>n</var>&rsquo;th output, <code>%th (<var>m</var>)</code> is the
(<var>n</var> - <var>m</var>)&rsquo;th output.
</p>
<p><code>%th</code> is recognized by <code><a href="maxima_75.html#batch">batch</a></code> and <code><a href="maxima_75.html#load">load</a></code>.  In a file processed
by <code>batch</code>, <code>%th</code> has the same meaning as at the interactive prompt.
In a file processed by <code>load</code>, <code>%th</code> refers to output expressions most
recently computed at the interactive prompt or in a batch file; <code>%th</code> does
not refer to output expressions in the file being processed.
</p>
<p>See also <code><a href="#g_t_0025">%</a></code> and <code><a href="#g_t_0025_0025">%%</a></code>.
</p>
<p>Example:
</p>
<p><code>%th</code> is useful in <code>batch</code> files or for referring to a group of
output expressions.  This example sets <code>s</code> to the sum of the last five
output expressions.
</p>
<div class="example">
<pre class="example">(%i1) 1;2;3;4;5;
(%o1)                           1
(%o2)                           2
(%o3)                           3
(%o4)                           4
(%o5)                           5
(%i6) block (s: 0, for i:1 thru 5 do s: s + %th(i), s);
(%o6)                          15
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="g_t_003f"></a><a name="Item_003a-Command_002fdeffn_002f_003f"></a><dl>
<dt><a name="index-_003f"></a>Special symbol: <strong>?</strong></dt>
<dd><a name="index-Fetch-documentation"></a>

<p>As prefix to a function or variable name, <code>?</code> signifies that the name is a
Lisp name, not a Maxima name.  For example, <code>?round</code> signifies the Lisp
function <code>ROUND</code>.  See <a href="maxima_172.html#Lisp-and-Maxima">Lisp and Maxima</a> for more on this point.
</p>
<p>The notation <code>? word</code> (a question mark followed a word, separated by
whitespace) is equivalent to <code>describe(&quot;word&quot;)</code>.  The question mark must
occur at the beginning of an input line; otherwise it is not recognized as a
request for documentation.  See also <code><a href="maxima_5.html#describe">describe</a></code>.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Help">Help</a>
&middot;<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="g_t_003f_003f"></a><a name="Item_003a-Command_002fdeffn_002f_003f_003f"></a><dl>
<dt><a name="index-_003f_003f"></a>Special symbol: <strong>??</strong></dt>
<dd><a name="index-Fetch-documentation-_0028inexact-search_0029"></a>

<p>The notation <code>?? word</code> (<code>??</code> followed a word, separated by whitespace)
is equivalent to <code>describe(&quot;word&quot;, inexact)</code>.  The question mark must occur
at the beginning of an input line; otherwise it is not recognized as a request
for documentation.  See also <code><a href="maxima_5.html#describe">describe</a></code>.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Help">Help</a>
&middot;<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="g_t_0024"></a><a name="Item_003a-Command_002fdeffn_002f_0024"></a><dl>
<dt><a name="index-_0024"></a>Input terminator: <strong>$</strong></dt>
<dd><a name="index-Input-terminator-_0028without-display_0029"></a>

<p>The dollar sign <code>$</code> terminates an input expression,
and the most recent output <code>%</code> and an output label, e.g. <code>%o1</code>,
are assigned the result, but the result is not displayed.
</p>
<p>See also <code><a href="#g_t_003b">;</a></code>.
</p>
<p>Example:
</p><div class="example">
<pre class="example">(%i1) 1 + 2 + 3 $
</pre><pre class="example">(%i2) %;
(%o2)                           6
</pre><pre class="example">(%i3) %o1;
(%o3)                           6
</pre></div>
</dd></dl>

<a name="g_t_003b"></a><a name="Item_003a-Command_002fdeffn_002f_003b"></a><dl>
<dt><a name="index-_003b"></a>Input terminator: <strong>;</strong></dt>
<dd><a name="index-Input-terminator-_0028with-display_0029"></a>

<p>The semicolon <code>;</code> terminates an input expression,
and the resulting output is displayed.
</p>
<p>See also <code><a href="#g_t_0024">$</a></code>.
</p>
<p>Example:
</p><div class="example">
<pre class="example">(%i1) 1 + 2 + 3;
(%o1)                           6
</pre></div>
</dd></dl>

<a name="inchar"></a><a name="Item_003a-Command_002fdefvr_002finchar"></a><dl>
<dt><a name="index-inchar"></a>Option variable: <strong>inchar</strong></dt>
<dd><p>Default value: <code>%i</code>
</p>
<p><code>inchar</code> is the prefix of the labels of expressions entered by the user.
Maxima automatically constructs a label for each input expression by 
concatenating <code>inchar</code> and <code><a href="#linenum">linenum</a></code>.
</p>
<p><code>inchar</code> may be assigned any string or symbol, not necessarily a single 
character.  Because Maxima internally takes into account only the first char of
the prefix, the prefixes <code>inchar</code>, <code><a href="#outchar">outchar</a></code>, and
<code><a href="#linechar">linechar</a></code> should have a different first char.  Otherwise some commands
like <code>kill(inlabels)</code> do not work as expected.
</p>
<p>See also <code><a href="#labels">labels</a></code>.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) inchar: &quot;input&quot;;
(%o1)                         input
</pre><pre class="example">(input2) expand((a+b)^3);
                     3        2      2      3
(%o2)               b  + 3 a b  + 3 a  b + a
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
&middot;</div></dd></dl>

<a name="infolists"></a><a name="Item_003a-Command_002fdefvr_002finfolists"></a><dl>
<dt><a name="index-infolists"></a>System variable: <strong>infolists</strong></dt>
<dd><p>Default value: <code>[]</code>
</p>
<p><code>infolists</code> is a list of the names of all of the information
lists in Maxima.  These are:
</p>
<dl compact="compact">
<dt><code>labels</code></dt>
<dd><p>All bound <code>%i</code>, <code>%o</code>, and <code>%t</code> labels.
</p></dd>
<dt><code>values</code></dt>
<dd><p>All bound atoms which are user variables, not Maxima options or switches,
created by <code><a href="maxima_40.html#g_t_003a">:</a></code> or <code><a href="maxima_40.html#g_t_003a_003a">::</a></code> or functional binding.
</p></dd>
<dt><code>functions</code></dt>
<dd><p>All user-defined functions, created by <code><a href="maxima_40.html#g_t_003a_003d">:=</a></code> or <code><a href="maxima_170.html#define">define</a></code>.
</p></dd>
<dt><code>arrays</code></dt>
<dd><p>All arrays, <code><a href="maxima_23.html#hashed-arrays">hashed arrays</a></code> and <code><a href="maxima_168.html#memoizing-functions">memoizing functions</a></code>.
</p></dd>
<dt><code>macros</code></dt>
<dd><p>All user-defined macro functions, created by <code><a href="maxima_40.html#g_t_003a_003a_003d">::=</a></code>.
</p></dd>
<dt><code>myoptions</code></dt>
<dd><p>All options ever reset by the user (whether or not they
are later reset to their default values).
</p></dd>
<dt><code>rules</code></dt>
<dd><p>All user-defined pattern matching and simplification rules, created
by <code><a href="maxima_162.html#tellsimp">tellsimp</a></code>, <code><a href="maxima_162.html#tellsimpafter">tellsimpafter</a></code>, <code><a href="maxima_162.html#defmatch">defmatch</a></code>, or
<code><a href="maxima_162.html#defrule">defrule</a></code>.
</p></dd>
<dt><code>aliases</code></dt>
<dd><p>All atoms which have a user-defined alias, created by the <code><a href="maxima_33.html#alias">alias</a></code>,<!-- /@w -->
<code><a href="maxima_33.html#ordergreat">ordergreat</a></code>, <code><a href="maxima_33.html#orderless">orderless</a></code> functions or by declaring the atom as a
<code><a href="maxima_33.html#noun">noun</a></code> with <code><a href="maxima_62.html#declare">declare</a></code>.
</p></dd>
<dt><code>dependencies</code></dt>
<dd><p>All atoms which have functional dependencies, created by the
<code><a href="maxima_101.html#depends">depends</a></code>, <code><a href="maxima_101.html#dependencies">dependencies</a></code>, or <code><a href="maxima_101.html#gradef">gradef</a></code> functions.
</p></dd>
<dt><code>gradefs</code></dt>
<dd><p>All functions which have user-defined derivatives, created by the
<code><a href="maxima_101.html#gradef">gradef</a></code> function.
</p></dd>
<dt><code>props</code></dt>
<dd><p>All atoms which have any property other than those mentioned above, such as
properties established by <code><a href="maxima_101.html#atvalue">atvalue</a></code> or <code><a href="maxima_162.html#matchdeclare">matchdeclare</a></code>, etc.,
as well as properties established in the <code><a href="maxima_62.html#declare">declare</a></code> function.
</p></dd>
<dt><code>structures</code></dt>
<dd><p>All structs defined using <code><a href="maxima_27.html#defstruct">defstruct</a></code>.
</p></dd>
<dt><code>let_rule_packages</code></dt>
<dd><p>All user-defined <code><a href="maxima_162.html#let">let</a></code> rule packages
plus the special package <code><a href="maxima_162.html#default_005flet_005frule_005fpackage">default_let_rule_package</a></code>.
(<code>default_let_rule_package</code> is the name of the rule package used when
one is not explicitly set by the user.)
</p></dd>
</dl>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Declarations-and-inferences">Declarations and inferences</a>
&middot;<a href="maxima_424.html#Category_003a-Global-variables">Global variables</a>
&middot;</div></dd></dl>


<a name="kill"></a><a name="Item_003a-Command_002fdeffn_002fkill"></a><dl>
<dt><a name="index-kill"></a>Function: <strong>kill</strong> <em><br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>kill</tt> (<var>a_1</var>, &hellip;, <var>a_n</var>) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>kill</tt> (labels) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>kill</tt> (inlabels, outlabels, linelabels) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>kill</tt> (<var>n</var>) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>kill</tt> ([<var>m</var>, <var>n</var>]) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>kill</tt> (values, functions, arrays, &hellip;) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>kill</tt> (all) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>kill</tt> (allbut (<var>a_1</var>, &hellip;, <var>a_n</var>))</em></dt>
<dd>
<p>Removes all bindings (value, function, array, or rule) from the arguments
<var>a_1</var>, &hellip;, <var>a_n</var>.  An argument <var>a_k</var> may be a symbol or a
single array element.  When <var>a_k</var> is a single array element, <code>kill</code>
unbinds that element without affecting any other elements of the array.
</p>
<p>Several special arguments are recognized.  Different kinds of arguments
may be combined, e.g., <code>kill (inlabels, functions, allbut (foo, bar))</code>.
</p>
<p><code>kill (labels)</code> unbinds all input, output, and intermediate expression
labels created so far.  <code>kill (inlabels)</code> unbinds only input labels which
begin with the current value of <code><a href="#inchar">inchar</a></code>.  Likewise,
<code>kill (outlabels)</code> unbinds only output labels which begin with the current
value of <code><a href="#outchar">outchar</a></code>, and <code>kill (linelabels)</code> unbinds only
intermediate expression labels which begin with the current value of
<code><a href="#linechar">linechar</a></code>.
</p>
<p><code>kill (<var>n</var>)</code>, where <var>n</var> is an integer,
unbinds the <var>n</var> most recent input and output labels.
</p>
<p><code>kill ([<var>m</var>, <var>n</var>])</code> unbinds input and output labels <var>m</var> through
<var>n</var>.
</p>
<p><code>kill (<var>infolist</var>)</code>, where <var>infolist</var> is any item in
<code>infolists</code> (such as <code><a href="#values">values</a></code>, <code><a href="maxima_170.html#functions">functions</a></code>, or
<code><a href="maxima_24.html#arrays">arrays</a></code>) unbinds all items in <var>infolist</var>.
See also <code><a href="#infolists">infolists</a></code>.
</p>
<p><code>kill (all)</code> unbinds all items on all infolists.  <code>kill (all)</code> does
not reset global variables to their default values; see <code><a href="#reset">reset</a></code> on this
point.
</p>
<p><code>kill (allbut (<var>a_1</var>, ..., <var>a_n</var>))</code> unbinds all items on all
infolists except for <var>a_1</var>, &hellip;, <var>a_n</var>.
<code>kill (allbut (<var>infolist</var>))</code> unbinds all items except for the ones on
<var>infolist</var>, where <var>infolist</var> is <code><a href="#values">values</a></code>,<!-- /@w -->
<code><a href="maxima_170.html#functions">functions</a></code>, <code><a href="maxima_24.html#arrays">arrays</a></code>, etc.
</p>
<p>The memory taken up by a bound property is not released until all symbols are
unbound from it.  In particular, to release the memory taken up by the value of
a symbol, one unbinds the output label which shows the bound value, as well as
unbinding the symbol itself.
</p>
<p><code>kill</code> quotes its arguments.  The quote-quote operator <code>'<!-- /@w -->'</code>
defeats quotation.
</p>
<p><code>kill (<var>symbol</var>)</code> unbinds all properties of <var>symbol</var>.  In contrast,
the functions <code><a href="maxima_159.html#remvalue">remvalue</a></code>, <code><a href="maxima_170.html#remfunction">remfunction</a></code>,<!-- /@w -->
<code><a href="maxima_24.html#remarray">remarray</a></code>, and <code><a href="maxima_162.html#remrule">remrule</a></code> unbind a specific property.
Note that facts declared by <code><a href="maxima_63.html#assume">assume</a></code> don&rsquo;t require a symbol they apply to,
therefore aren&rsquo;t stored as properties of symbols and therefore aren&rsquo;t affected
by <code>kill</code>.
</p>
<p><code>kill</code> always returns <code>done</code>, even if an argument has no binding.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Evaluation">Evaluation</a>
&middot;<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;<a href="maxima_424.html#Category_003a-Session-management">Session management</a>
&middot;</div></dd></dl>

<a name="labels"></a><a name="Item_003a-Command_002fdeffn_002flabels"></a><dl>
<dt><a name="index-labels"></a>Function: <strong>labels</strong> <em>(<var>symbol</var>)</em></dt>
<dd>
<p>Returns the list of input, output, or intermediate expression labels which begin
with <var>symbol</var>.  Typically <var>symbol</var> is the value of
<code><a href="#inchar">inchar</a></code>, <code><a href="#outchar">outchar</a></code>, or <code><a href="#linechar">linechar</a></code>.
If no labels begin with <var>symbol</var>, <code>labels</code> returns an empty list.
</p>
<p>By default, Maxima displays the result of each user input expression, giving the
result an output label.  The output display is suppressed by terminating the
input with <code>$</code> (dollar sign) instead of <code>;</code> (semicolon).  An output
label is constructed and bound to the result, but not displayed, and the label
may be referenced in the same way as displayed output labels.  See also
<code><a href="#g_t_0025">%</a></code>, <code><a href="#g_t_0025_0025">%%</a></code>, and <code><a href="#g_t_0025th">%th</a></code>.
</p>
<p>Intermediate expression labels can be generated by some functions.  The option
variable <code><a href="maxima_108.html#programmode">programmode</a></code> controls whether <code><a href="maxima_108.html#solve">solve</a></code> and some other
functions generate intermediate expression labels instead of returning a list of
expressions.  Some other functions, such as <code><a href="maxima_9.html#ldisplay">ldisplay</a></code>, always generate
intermediate expression labels.
</p>
<p>See also <code><a href="#inchar">inchar</a></code>, <code><a href="#outchar">outchar</a></code>, <code><a href="#linechar">linechar</a></code>, and
<code><a href="#infolists">infolists</a></code>.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Display-functions">Display functions</a>
&middot;<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="Item_003a-Command_002fdefvr_002flabels"></a><dl>
<dt><a name="index-labels-1"></a>System variable: <strong>labels</strong></dt>
<dd>
<p>The variable <code>labels</code> is the list of input, output, and intermediate
expression labels, including all previous labels if <code>inchar</code>,
<code>outchar</code>, or <code>linechar</code> were redefined.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
&middot;<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="linechar"></a><a name="Item_003a-Command_002fdefvr_002flinechar"></a><dl>
<dt><a name="index-linechar"></a>Option variable: <strong>linechar</strong></dt>
<dd><p>Default value: <code>%t</code>
</p>
<p><code>linechar</code> is the prefix of the labels of intermediate expressions 
generated by Maxima.  Maxima constructs a label for each intermediate expression 
(if displayed) by concatenating <code>linechar</code> and <code><a href="#linenum">linenum</a></code>.
</p>
<p><code>linechar</code> may be assigned any string or symbol, not necessarily a single 
character.  Because Maxima internally takes into account only the first char of
the prefix, the prefixes <code><a href="#inchar">inchar</a></code>, <code><a href="#outchar">outchar</a></code>, and
<code>linechar</code> should have a different first char.  Otherwise some commands
like <code>kill(inlabels)</code> do not work as expected.
</p>
<p>Intermediate expressions might or might not be displayed.
See <code><a href="maxima_108.html#programmode">programmode</a></code> and <code><a href="#labels">labels</a></code>.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
&middot;</div></dd></dl>


<a name="linenum"></a><a name="Item_003a-Command_002fdefvr_002flinenum"></a><dl>
<dt><a name="index-linenum"></a>System variable: <strong>linenum</strong></dt>
<dd>
<p>The line number of the current pair of input and output expressions.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
&middot;<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>


<a name="myoptions"></a><a name="Item_003a-Command_002fdefvr_002fmyoptions"></a><dl>
<dt><a name="index-myoptions"></a>System variable: <strong>myoptions</strong></dt>
<dd><p>Default value: <code>[]</code>
</p>
<p><code>myoptions</code> is the list of all options ever reset by the user,
whether or not they get reset to their default value.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Global-variables">Global variables</a>
&middot;<a href="maxima_424.html#Category_003a-Session-management">Session management</a>
&middot;<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="nolabels"></a><a name="Item_003a-Command_002fdefvr_002fnolabels"></a><dl>
<dt><a name="index-nolabels"></a>Option variable: <strong>nolabels</strong></dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>nolabels</code> is <code>true</code>, input and output result labels (<code>%i</code>
and <code>%o</code>, respectively) are displayed, but the labels are not bound to
results, and the labels are not appended to the <code><a href="#labels">labels</a></code> list.  Since
labels are not bound to results, garbage collection can recover the memory taken
up by the results.
</p>
<p>Otherwise input and output result labels are bound to results, and the labels
are appended to the <code>labels</code> list.
</p>
<p>Intermediate expression labels (<code>%t</code>) are not affected by <code>nolabels</code>;
whether <code>nolabels</code> is <code>true</code> or <code>false</code>, intermediate expression
labels are bound and appended to the <code>labels</code> list.
</p>
<p>See also <code><a href="maxima_75.html#batch">batch</a></code>, <code><a href="maxima_75.html#load">load</a></code>, and <code><a href="#labels">labels</a></code>.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Global-flags">Global flags</a>
&middot;<a href="maxima_424.html#Category_003a-Session-management">Session management</a>
&middot;</div></dd></dl>


<a name="optionset"></a><a name="Item_003a-Command_002fdefvr_002foptionset"></a><dl>
<dt><a name="index-optionset"></a>Option variable: <strong>optionset</strong></dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>optionset</code> is <code>true</code>, Maxima prints out a message whenever a
Maxima option is reset.  This is useful if the user is doubtful of the spelling
of some option and wants to make sure that the variable he assigned a value to
was truly an option variable.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) optionset:true;
assignment: assigning to option optionset
(%o1)                         true
(%i2) gamma_expand:true;
assignment: assigning to option gamma_expand
(%o2)                         true
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Global-flags">Global flags</a>
&middot;<a href="maxima_424.html#Category_003a-Session-management">Session management</a>
&middot;<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="outchar"></a><a name="Item_003a-Command_002fdefvr_002foutchar"></a><dl>
<dt><a name="index-outchar"></a>Option variable: <strong>outchar</strong></dt>
<dd><p>Default value: <code>%o</code>
</p>
<p><code>outchar</code> is the prefix of the labels of expressions computed by Maxima.
Maxima automatically constructs a label for each computed expression by 
concatenating <code>outchar</code> and <code><a href="#linenum">linenum</a></code>.
</p>
<p><code>outchar</code> may be assigned any string or symbol, not necessarily a single 
character.  Because Maxima internally takes into account only the first char of
the prefix, the prefixes <code><a href="#inchar">inchar</a></code>, <code>outchar</code> and
<code><a href="#linechar">linechar</a></code> should have a different first char.  Otherwise some commands
like <code>kill(inlabels)</code> do not work as expected.
</p>
<p>See also <code><a href="#labels">labels</a></code>.
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) outchar: &quot;output&quot;;
(output1)                    output
</pre><pre class="example">(%i2) expand((a+b)^3);
                     3        2      2      3
(output2)           b  + 3 a b  + 3 a  b + a
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
&middot;</div></dd></dl>

<a name="playback"></a><a name="Item_003a-Command_002fdeffn_002fplayback"></a><dl>
<dt><a name="index-playback"></a>Function: <strong>playback</strong> <em><br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>playback</tt> () <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>playback</tt> (<var>n</var>) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>playback</tt> ([<var>m</var>, <var>n</var>]) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>playback</tt> ([<var>m</var>]) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>playback</tt> (input) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>playback</tt> (slow) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>playback</tt> (time) <br>&nbsp;&nbsp;&nbsp;&nbsp;<tt>playback</tt> (grind)</em></dt>
<dd>
<p>Displays input, output, and intermediate expressions, without recomputing them.
<code>playback</code> only displays the expressions bound to labels; any other output
(such as text printed by <code><a href="maxima_9.html#print">print</a></code> or <code><a href="maxima_5.html#describe">describe</a></code>, or error messages)
is not displayed.  See also <code><a href="#labels">labels</a></code>.
</p>
<p><code>playback</code> quotes its arguments.  The quote-quote operator <code>'<!-- /@w -->'</code>
defeats quotation.  <code>playback</code> always returns <code>done</code>.
</p>
<p><code>playback ()</code> (with no arguments) displays all input, output, and
intermediate expressions generated so far.  An output expression is displayed
even if it was suppressed by the <code>$</code> terminator when it was originally
computed.
</p>
<p><code>playback (<var>n</var>)</code> displays the most recent <var>n</var> expressions.
Each input, output, and intermediate expression counts as one.
</p>
<p><code>playback ([<var>m</var>, <var>n</var>])</code> displays input, output, and intermediate
expressions with numbers from <var>m</var> through <var>n</var>, inclusive.
</p>
<p><code>playback ([<var>m</var>])</code> is equivalent to
<code>playback ([<var>m</var>, <var>m</var>])</code>; this usually prints one pair of input and
output expressions.
</p>
<p><code>playback (input)</code> displays all input expressions generated so far.
</p>
<p><code>playback (slow)</code> pauses between expressions and waits for the user to
press <code>enter</code>.  This behavior is similar to <code><a href="maxima_5.html#demo">demo</a></code>.
<code>playback (slow)</code> is useful in conjunction with <code>save</code> or
<code><a href="maxima_75.html#stringout">stringout</a></code> when creating a secondary-storage file in order to pick out
useful expressions.
</p>
<p><code>playback (time)</code> displays the computation time for each expression.
</p>
<p><code>playback (grind)</code> displays input expressions in the same format as the
<code>grind</code> function.  Output expressions are not affected by the <code>grind</code>
option.  See <code><a href="maxima_9.html#grind">grind</a></code>.
</p>
<p>Arguments may be combined, e.g., <code>playback ([5, 10], grind, time, slow)</code>.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Display-functions">Display functions</a>
&middot;<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="prompt"></a><a name="Item_003a-Command_002fdefvr_002fprompt"></a><dl>
<dt><a name="index-prompt"></a>Option variable: <strong>prompt</strong></dt>
<dd><p>Default value: <code>_</code>
</p>
<p><code>prompt</code> is the prompt symbol of the <code><a href="maxima_5.html#demo">demo</a></code> function,
<code>playback (slow)</code> mode, and the Maxima break loop (as invoked by
<code><a href="maxima_170.html#break">break</a></code>).
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Global-variables">Global variables</a>
&middot;<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="quit"></a><a name="Item_003a-Command_002fdeffn_002fquit"></a><dl>
<dt><a name="index-quit"></a>Function: <strong>quit</strong> <em>([<var>exit-code</var>])</em></dt>
<dd>
<p>Terminates the Maxima session.  Note that the function must be invoked as
<code>quit();</code> or <code>quit()$</code>, not <code>quit</code> by itself.
<code>quit</code> supports returning an exit code to the shell for Lisps and
OSes that support exit codes.  The default exit code is 0 (usually
indicating no errors encountered).  Thus <code>quit(1)</code> indicates to the
shell that maxima exited with some kind of failure.  This is useful in
scripts where maxima can indicate to the shell that maxima failed to
compute something or some other bad thing happened.
</p>
<p>To stop a lengthy computation, type <code>control-C</code>.  The default action is to
return to the Maxima prompt.  If <code>*debugger-hook*</code> is <code>nil</code>,
<code>control-C</code> opens the Lisp debugger.  See also <a href="maxima_176.html#Debugging">Debugging</a>.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="read"></a><a name="Item_003a-Command_002fdeffn_002fread"></a><dl>
<dt><a name="index-read"></a>Function: <strong>read</strong> <em>(<var>expr_1</var>, &hellip;, <var>expr_n</var>)</em></dt>
<dd>
<p>Prints <var>expr_1</var>, &hellip;, <var>expr_n</var>, then reads one expression from the
console and returns the evaluated expression.  The expression is terminated with
a semicolon <code>;</code> or dollar sign <code>$</code>.
</p>
<p>See also <code><a href="#readonly">readonly</a></code>
</p>
<p>Example:
</p>
<div class="example">
<pre class="example">(%i1) foo: 42$ 
(%i2) foo: read (&quot;foo is&quot;, foo, &quot; -- enter new value.&quot;)$
foo is 42  -- enter new value. 
(a+b)^3;
(%i3) foo;
                                     3
(%o3)                         (b + a)
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="readonly"></a><a name="Item_003a-Command_002fdeffn_002freadonly"></a><dl>
<dt><a name="index-readonly"></a>Function: <strong>readonly</strong> <em>(<var>expr_1</var>, &hellip;, <var>expr_n</var>)</em></dt>
<dd>
<p>Prints <var>expr_1</var>, &hellip;, <var>expr_n</var>, then reads one expression from the
console and returns the expression (without evaluation).  The expression is
terminated with a <code>;</code> (semicolon) or <code>$</code> (dollar sign).
</p>
<p>See also <code><a href="#read">read</a></code>.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) aa: 7$
(%i2) foo: readonly (&quot;Enter an expression:&quot;);
Enter an expression: 
2^aa;
                                  aa
(%o2)                            2
(%i3) foo: read (&quot;Enter an expression:&quot;);
Enter an expression: 
2^aa;
(%o3)                            128
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="reset"></a><a name="Item_003a-Command_002fdeffn_002freset"></a><dl>
<dt><a name="index-reset"></a>Function: <strong>reset</strong> <em>()</em></dt>
<dd>
<p>Resets many global variables and options, and some other variables, to their
default values.
</p>
<p><code>reset</code> processes the variables on the Lisp list
<code>*variable-initial-values*</code>.  The Lisp macro <code>defmvar</code> puts variables
on this list (among other actions).  Many, but not all, global variables and
options are defined by <code>defmvar</code>, and some variables defined by
<code>defmvar</code> are not global variables or options.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Session-management">Session management</a>
&middot;</div></dd></dl>

<a name="showtime"></a><a name="Item_003a-Command_002fdefvr_002fshowtime"></a><dl>
<dt><a name="index-showtime"></a>Option variable: <strong>showtime</strong></dt>
<dd><p>Default value: <code>false</code>
</p>
<p>When <code>showtime</code> is <code>true</code>, the computation time and elapsed time is
printed with each output expression.
</p>
<p>The computation time is always recorded, so <code><a href="maxima_155.html#time">time</a></code> and <code><a href="#playback">playback</a></code> can
display the computation time even when <code>showtime</code> is <code>false</code>.
</p>
<p>See also <code><a href="maxima_179.html#timer">timer</a></code>.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Display-flags-and-variables">Display flags and variables</a>
&middot;<a href="maxima_424.html#Category_003a-Debugging">Debugging</a>
&middot;</div></dd></dl>

<a name="to_005flisp"></a><a name="Item_003a-Command_002fdeffn_002fto_005flisp"></a><dl>
<dt><a name="index-to_005flisp"></a>Function: <strong>to_lisp</strong> <em>()</em></dt>
<dd>
<p>Enters the Lisp system under Maxima.  <code>(to-maxima)</code> returns to Maxima.
</p>
<p>Example:
</p>
<p>Define a function and enter the Lisp system under Maxima.  The definition is
inspected on the property list, then the function definition is extracted,
factored and stored in the variable <code>$result</code>.  The variable can be used in Maxima
after returning to Maxima.
</p>
<div class="example">
<pre class="example">(%i1) f(x):=x^2+x;
                                  2
(%o1)                    f(x) := x  + x
(%i2) to_lisp();
Type (to-maxima) to restart, ($quit) to quit Maxima.
MAXIMA&gt; (symbol-plist '$f)
(MPROPS (NIL MEXPR ((LAMBDA) ((MLIST) $X) 
                             ((MPLUS) ((MEXPT) $X 2) $X))))
MAXIMA&gt; (setq $result ($factor (caddr (mget '$f 'mexpr))))
((MTIMES SIMP FACTORED) $X ((MPLUS SIMP IRREDUCIBLE) 1 $X))
MAXIMA&gt; (to-maxima)
Returning to Maxima
(%o2)                         true
(%i3) result;
(%o3)                       x (x + 1)
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Console-interaction">Console interaction</a>
&middot;</div></dd></dl>

<a name="eval_005fstring_005flisp"></a><a name="Item_003a-Command_002fdeffn_002feval_005fstring_005flisp"></a><dl>
<dt><a name="index-eval_005fstring_005flisp"></a>Function: <strong>eval_string_lisp</strong> <em>(<var>str</var>)</em></dt>
<dd>
<p>Sequentially read lisp forms from the string <var>str</var> and evaluate them.
Any values produced from the last form are returned as a Maxima list.
</p>
<p>Examples:
</p>
<div class="example">
<pre class="example">(%i1) eval_string_lisp (&quot;&quot;);
(%o1) []
</pre><pre class="example">(%i2) eval_string_lisp (&quot;(values)&quot;);
(%o2) []
</pre><pre class="example">(%i3) eval_string_lisp (&quot;69&quot;);
(%o3) [69]
</pre><pre class="example">(%i4) eval_string_lisp (&quot;1 2 3&quot;);
(%o4) [3]
</pre><pre class="example">(%i5) eval_string_lisp (&quot;(values 1 2 3)&quot;);
(%o5) [1,2,3]
</pre><pre class="example">(%i6) eval_string_lisp (&quot;(defun $foo (x) (* 2 x))&quot;);
(%o6) [foo]
</pre><pre class="example">(%i7) foo (5);
(%o7) 10
</pre></div>

<p>See also <a href="maxima_378.html#eval_005fstring">eval_string</a>.
</p>
<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Debugging">Debugging</a>
&middot;<a href="maxima_424.html#Category_003a-Evaluation">Evaluation</a>
&middot;</div>
</dd></dl>

<a name="values"></a><a name="Item_003a-Command_002fdefvr_002fvalues"></a><dl>
<dt><a name="index-values"></a>System variable: <strong>values</strong></dt>
<dd><p>Initial value: <code>[]</code>
</p>
<p><code>values</code> is a list of all bound user variables (not Maxima options or
switches).  The list comprises symbols bound by <code><a href="maxima_40.html#g_t_003a">:</a></code>, or <code><a href="maxima_40.html#g_t_003a_003a">::</a></code>.
</p>
<p>If the value of a variable is removed with the commands <code>kill</code>, 
<code><a href="maxima_62.html#remove">remove</a></code>, or <code><a href="maxima_159.html#remvalue">remvalue</a></code> the variable is deleted from
<code>values</code>.
</p>
<p>See <code><a href="maxima_170.html#functions">functions</a></code> for a list of user defined functions.
</p>
<p>Examples:
</p>
<p>First, <code>values</code> shows the symbols <code>a</code>, <code>b</code>, and <code>c</code>, but 
not <code>d</code>, it is not bound to a value, and not the user function <code>f</code>.
The values are removed from the variables.  <code>values</code> is the empty list.
</p>
<div class="example">
<pre class="example">(%i1) [a:99, b:: a-90, c:a-b, d, f(x):=x^2];
                                           2
(%o1)              [99, 9, 90, d, f(x) := x ]
</pre><pre class="example">(%i2) values;
(%o2)                       [a, b, c]
</pre><pre class="example">(%i3) [kill(a), remove(b,value), remvalue(c)];
(%o3)                   [done, done, [c]]
</pre><pre class="example">(%i4) values;
(%o4)                          []
</pre></div>

<div class=categorybox>
Categories:<a href="maxima_424.html#Category_003a-Evaluation">Evaluation</a>
&middot;<a href="maxima_424.html#Category_003a-Global-variables">Global variables</a>
&middot;</div></dd></dl>

<a name="Item_003a-Command_002fnode_002fFunctions-and-Variables-for-Display"></a><hr>
<div class="header">
<p>
Next: <a href="maxima_9.html#Functions-and-Variables-for-Display" accesskey="n" rel="next">Functions and Variables for Display</a>, Previous: <a href="maxima_7.html#Introduction-to-Command-Line" accesskey="p" rel="previous">Introduction to Command Line</a>, Up: <a href="maxima_6.html#Command-Line" accesskey="u" rel="up">Command Line</a> &nbsp; [<a href="maxima_toc.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="maxima_423.html#Function-and-Variable-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>