Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

progn

progn

type: special form (fsubr)
location: built-in
source file: xlcont.c
Common LISP compatible: yes
supported on: all machines

SYNTAX

(progn  [ <expr1>  <expr2> ... ]  )
        <exprN>         -       expressions comprising the body of the loop

DESCRIPTION

The PROGN special form is basically a 'block' construct (like a PASCAL BEGIN / END) that contains a block of code (expressions) to evaluate. The last <expr>'s value will be returned as the result of PROGN. If there are no <expr>s, NIL is returned.

EXAMPLES

(progn (print "hi") (print "ho"))       ; prints "hi" "ho" returns "ho"
(progn)                                 ; returns NIL
(progn "hey" (print "ho"))              ; prints "ho"      returns "ho"
(progn 'a)                              ; returns A
(progn 'a 'b 'c)                        ; returns C

NOTE: PROG1, PROG2, PROGN and PROGV do not allow the use of RETURN or GO or tags for GO.


Go to the first, previous, next, last section, table of contents.