(while text statement ...)


Keep doing it while it's still true.


This function is a common loop in LISP. The statement controls whether the loop continues or breaks. When statement is true, the loop continues. When statement is nil, the loop breaks. The last statement before the nil is displayed.

Example

Code Returns
(setq x 25)  
(while (/= x 20)  
(setq x (1- x)  
) 20

Tell me about...

(cond (statement1 result1 ...) ...)

(if test statement1 [statement2])

(repeat number statement1 [statement2 ...])

(setq symbol1 statement1 [symbol2 statement2] ...)

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language