type: special form (fsubr) location: built-in source file: xlcont.c Common LISP compatible: yes supported on: all machines
(tagbody [ <expr> ... ] ) <expr> - expressions comprising the body of the block which may contain GOs or tags for GO
The TAGBODY special form is basically a 'block' construct that contains a block of code (expressions) to evaluate. After the execution of the TAGBODY <expr>'s, NIL is returned. The TAGBODY special form allows 'go-to' style branching within the 'block' construct via the GO special form. To allow this, each <expr> may be a tag or a form. The tag-symbol is the 'label' and must exist somewhere within the 'block' that the GO occurs within.
(tagbody ; build the 'block' start (print "begin") ; tag - start (GO end) ; (print "hello") ; won't ever be reached end (print "done")) ; tag - END ; prints "begin" "done" ; returns NIL