User Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

cl:variables:repl-star [2017/05/01 21:00] (current)
Line 1: Line 1:
 +====== Variable *, **, *** ======
 +
 +====Value Type====
 +an //​[[CL:​Glossary:​object]]//​.
 +
 +====Initial Value====
 +//​[[CL:​Glossary:​implementation-dependent]]//​.
 +
 +====Description====
 +The //​[[CL:​Glossary:​variable|variables]]//​ **<​nowiki>​*</​nowiki>​**,​ **<​nowiki>​**</​nowiki>​**,​ and **<​nowiki>​***</​nowiki>​** are maintained by the //​[[CL:​Glossary:​Lisp read-eval-print loop]]// to save the values of results that are printed each time through the loop.
 +
 +The //​[[CL:​Glossary:​value]]//​ of **<​nowiki>​*</​nowiki>​** is the most recent //​[[CL:​Glossary:​primary value]]// that was printed, the //​[[CL:​Glossary:​value]]//​ of **<​nowiki>​**</​nowiki>​** is the previous value of **[[CL:​Types:​wildcard|*]]**,​ and the //​[[CL:​Glossary:​value]]//​ of **<​nowiki>​***</​nowiki>​** is the previous value of **<​nowiki>​**</​nowiki>​**.
 +
 +If several values are produced, **[[CL:​Types:​wildcard|*]]** contains the first value only; **[[CL:​Types:​wildcard|*]]** contains **[[CL:​Constant Variables:​nil]]** if zero values are produced.
 +
 +The //​[[CL:​Glossary:​value|values]]//​ of **[[CL:​Types:​wildcard|*]]**,​ **<​nowiki>​**</​nowiki>​**,​ and **<​nowiki>​***</​nowiki>​** are updated immediately prior to printing the //​[[CL:​Glossary:​return value]]// of a top-level //​[[CL:​Glossary:​form]]//​ by the //​[[CL:​Glossary:​Lisp read-eval-print loop]]//. If the //​[[CL:​Glossary:​evaluation]]//​ of such a //​[[CL:​Glossary:​form]]//​ is aborted prior to its normal return, the values of **[[CL:​Types:​wildcard|*]]**,​ **<​nowiki>​**</​nowiki>​**,​ and **<​nowiki>​***</​nowiki>​** are not updated.
 +
 +====Examples====
 +<​blockquote>​
 +([[CL:​Functions:​values]] 'a1 'a2) <r>A1
 +A2</​r>​
 +'b <​r>​B</​r>​
 +([[CL:​Functions:​values]] 'c1 'c2 'c3) <r>C1
 +C2
 +C3</​r>​
 +([[CL:​Functions:​list]] * ** ***) <​r>​(C1 B A1)</​r>​
 +
 +([[CL:​Macros:​defun]] cube-root (x) ([[CL:​Functions:​expt]] x 1/3)) <​r>​CUBE-ROOT</​r>​
 +([[CL:​Macros:​defparameter]] *a* (cube-root 27.0)) <​r>​*A*</​r>​
 +*a* <​r>​3.0</​r>​
 +([[CL:​Functions:​math-multiply|*]] * 9.0) <​r>​27.0</​r>​
 +</​blockquote>​
 +
 +====Affected By====
 +//​[[CL:​Glossary:​Lisp read-eval-print loop]]//.
 +
 +====See Also====
 +**[[CL:​Variables:​repl-minus|Variable -]]**, **[[CL:​Variables:​repl-plus|Variable +]]**, **[[CL:​Variables:​repl-slash|Variable /]]**, {\secref\TopLevelLoop}
 +
 +====Notes====
 +
 +<​blockquote>​
 +* ≡ (car [[CL:​Variables:​repl-slash|/​]])
 +** ≡ (car [[CL:​Variables:​repl-slash-slash|//​]])
 +*** ≡ (car [[CL:​Variables:​repl-slash-slash-slash|///​]])
 +</​blockquote>​
 +