The 'loop' special form specifies a 'repeat-forever' construct. The
expressions in'body' will be evaluated. When the last expression is
evaluated in 'body', 'loop' will then repeat the 'body'. When a
return is evaluated within a 'loop', the
specified value will be returned. 'loop' itself does not generate a return
value. Other exit mechanisms include
(setq i 65) ; initial value (loop ; LOOP (princ (int-char i)) ; print the character (if (= i 90) (return "done")) ; test for limit (setq i (1+ i))) ; increment and repeat ; prints ABCDEFGHIJKLMNOPQRSTUVWXYZ ; returns "done"
Note: If you create a 'loop' with no exit mechanism, you will probably have to abort your XLISP session.
See the
loop
special form in the