User Tools

Site Tools


ch2_1_when

Differences

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

Link to this comparison view

Next revision
Previous revision
ch2_1_when [2022/02/24 13:44] – created adminch2_1_when [2022/02/24 13:48] (current) admin
Line 1: Line 1:
 **''WHEN''** **''WHEN''**
  
-''WHEN'' is a simple LISP macro built on ''IF''. In LabLISP, ''WHEN'' is implemented as special form. Accepts any number of arguments. The first argument - the condition - is evaluated and if it is true (not ''NIL''), all the remaining forms are evaluated and result of the last one is returned, as in ''PROGN''. If the condition is false, the rest is ignored and when returns ''NIL''.+''WHEN'' is a simple LISP macro built on ''IF''. In LabLISP, ''WHEN'' is implemented as special form. Accepts any number of arguments. The first argument - the condition - is evaluated and if it is true (not ''NIL''), all the remaining forms are evaluated and result of the last one is returned, as in ''PROGN''. If the condition is false, the rest is ignored and when returns ''NIL''.
  
 <code lisp> <code lisp>
Line 9: Line 9:
 </code> </code>
  
 +See also ''IF'', ''PROGN'', ''UNLESS'', ''AND'', ''OR''
ch2_1_when.1645735485.txt.gz · Last modified: 2022/02/24 13:44 by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki