GNU Info

Info Node: (emacs-lisp-intro.info)if

(emacs-lisp-intro.info)if


Next: else Prev: let Up: Writing Defuns
Enter node , (file) or (file)node

The `if' Special Form
=====================

   A third special form, in addition to `defun' and `let', is the
conditional `if'.  This form is used to instruct the computer to make
decisions.  You can write function definitions without using `if', but
it is used often enough, and is important enough, to be included here.
It is used, for example, in the code for the function
`beginning-of-buffer'.

   The basic idea behind an `if', is that "_if_ a test is true, _then_
an expression is evaluated."  If the test is not true, the expression
is not evaluated.  For example, you might make a decision such as, "if
it is warm and sunny, then go to the beach!"

if in more detail
type-of-animal in detail
An example of an `if' expression.

automatically generated by info2www version 1.2.2.9