User Tools


Differences

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

Link to this comparison view

cl:macros:return [2019/10/13 03:00]
cl:macros:return [2019/10/20 12:00] (current)
Line 1: Line 1:
 +====== Macro RETURN ======
 +
 +====Syntax====
 +  * **return** //​[result]//​
 +
 +====Arguments and Values====
 +  * //result// - a //​[[CL:​Glossary:​form]]//;​ evaluated. The default is **[[CL:​Constant Variables:​nil]]**.
 +
 +====Description====
 +Returns, as if by **[[CL:​Special Operators:​return-from]]**,​ from the //​[[CL:​Glossary:​block]]//​ named **[[CL:​Constant Variables:​nil]]**.
 +
 +====Examples====
 +<​blockquote>​
 +([[CL:​Special Operators:​block]] [[CL:​Constant Variables:​nil]] (return) 1) <​r>​[[CL:​Constant Variables:​NIL]]</​r>​
 +([[CL:​Special Operators:​block]] [[CL:​Constant Variables:​nil]] (return 1) 2) <​r>​1</​r>​
 +([[CL:​Special Operators:​block]] [[CL:​Constant Variables:​nil]] (return ([[CL:​Functions:​values]] 1 2)) 3) <r>1
 +2</r>
 +([[CL:​Special Operators:​block]] [[CL:​Constant Variables:​nil]] ([[CL:​Special Operators:​block]] alpha (return 1) 2)) <​r>​1</​r>​
 +([[CL:​Special Operators:​block]] alpha ([[CL:​Special Operators:​block]] [[CL:​Constant Variables:​nil]] (return 1)) 2) <​r>​2</​r>​
 +([[CL:​Special Operators:​block]] [[CL:​Constant Variables:​nil]] ([[CL:​Special Operators:​block]] [[CL:​Constant Variables:​nil]] (return 1) 2)) <​r>​1</​r>​
 +</​blockquote>​
 +
 +====Affected By====
 +None.
 +
 +====Conditions====
 +None.
 +
 +====See Also====
 +  * **[[CL:​Special Operators:​block|Special Operator BLOCK]]**
 +  * **[[CL:​Special Operators:​return-from|Special Operator RETURN-FROM]]**
 +  * {\secref\Evaluation}
 +
 +====Notes====
 +<​blockquote>​
 +(return) ≡ ([[CL:​Special Operators:​return-from]] [[CL:​Constant Variables:​nil]]) ​
 +(return //form//) ≡ ([[CL:​Special Operators:​return-from]] [[CL:​Constant Variables:​nil]] //form//)
 +</​blockquote>​
 +
 +The //​[[CL:​Glossary:​implicit blocks]]// //​[[CL:​Glossary:​established]]//​ by //​[[CL:​Glossary:​macro|macros]]//​ such as **[[CL:​Macros:​do]]** are often named **[[CL:​Constant Variables:​nil]]**,​ so that **[[CL:​Macros:​return]]** can be used to exit from such //​[[CL:​Glossary:​form|forms]]//​.
 +