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.

prog1

prog1

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

SYNTAX

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

DESCRIPTION

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

EXAMPLES

(prog1 (print "hi") (print "ho"))       ; prints "hi" "ho" returns "hi"
(prog1)                                 ; returns NIL
(prog1 'a)                              ; returns A
(prog1 "hey" (print "ho"))              ; prints "ho"      returns "hey"

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.