Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision |
ch2_1_when [2022/02/24 13:44] – created admin | ch2_1_when [2022/02/24 13:48] (current) – admin |
---|
**''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 a 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> |
</code> | </code> |
| |
| See also ''IF'', ''PROGN'', ''UNLESS'', ''AND'', ''OR'' |