User Tools


Differences

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

Link to this comparison view

cl:special_operators:multiple-value-prog1 [2017/05/01 21:00] (current)
Line 1: Line 1:
 +====== Special Operator MULTIPLE-VALUE-PROG1 ======
 +
 +====Syntax====
 +  * **multiple-value-prog1** //​first-form form''​*''//​ → //​first-form-results//​
 +
 +====Arguments and Values====
 +  * //​first-form//​ - a //​[[CL:​Glossary:​form]]//;​ evaluated as described below.
 +  * //form// - a //​[[CL:​Glossary:​form]]//;​ evaluated as described below.
 +  * //​first-form-results//​ - the //​[[CL:​Glossary:​value|values]]//​ resulting from the //​[[CL:​Glossary:​evaluation]]//​ of //​first-form//​.
 +
 +====Description====
 +**multiple-value-prog1** evaluates //​first-form//​ and saves all the values produced by that //​[[CL:​Glossary:​form]]//​. It then evaluates each //form// from left to right, discarding their values.
 +
 +====Examples====
 +<​blockquote>​
 +([[CL:​Macros:​defparameter]] *temp* '(1 2 3)) <​r>​*TEMP*</​r>​
 +*temp* <r>(1 2 3) </r>
 +(multiple-value-prog1 ​
 +  ([[CL:​Functions:​values-list]] *temp*) ​
 +  ([[CL:​Macros:​defparameter]] *temp* [[CL:​Constant Variables:​nil]])
 +  ([[CL:​Functions:​values-list]] *temp*)) ​
 +<r>1
 +2
 +3 </r>
 +</​blockquote>​
 +
 +====Side Effects====
 +None.
 +
 +====Affected By====
 +None.
 +
 +====Exceptional Situations====
 +None.
 +
 +====See Also====
 +  * **[[CL:​Macros:​prog1|Macro PROG1]]**
 +
 +====Notes====
 +None.
 +