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.

Progs And Blocks

(prog (<binding>...) <expr>...)  THE PROGRAM FEATURE
(prog* (<binding>...) <expr>...)  PROG WITH SEQUENTIAL BINDING
    <binding>   the variable bindings each of which is either:
                1)  a symbol (which is initialized to nil)
                2)  a list whose car is a symbol and whose cadr
                        is an initialization expression
    <expr>      expressions to evaluate or tags (symbols)
    returns     nil or the argument passed to the return function
(block <name> <expr>...)  NAMED BLOCK
    <name>      the block name (symbol)
    <expr>      the block body
    returns     the value of the last expression
(return [<expr>])  CAUSE A PROG CONSTRUCT TO RETURN A VALUE
    <expr>      the value (defaults to nil)
    returns     never returns
(return-from <name> [<value>])  RETURN FROM A NAMED BLOCK
    <name>      the block name (symbol)
    <value>     the value to return (defaults to nil)
    returns     never returns
(tagbody <expr>...)  BLOCK WITH LABELS
    <expr>      expression(s) to evaluate or tags (symbols)
    returns     nil
(go <sym>)  GO TO A TAG WITHIN A TAGBODY OR PROG
    <sym>       the tag (quoted)
    returns     never returns
(progv <slist> <vlist> <expr>...)  DYNAMICALLY BIND SYMBOLS
    <slist>     list of symbols
    <vlist>     list of values to bind to the symbols
    <expr>      expression(s) to evaluate
    returns     the value of the last expression
(prog1 <expr1> <expr>...)  EXECUTE EXPRESSIONS SEQUENTIALLY
    <expr1>     the first expression to evaluate
    <expr>      the remaining expressions to evaluate
    returns     the value of the first expression
(prog2 <expr1> <expr2> <expr>...)  EXECUTE EXPRESSIONS SEQUENTIALLY
    <expr1>     the first expression to evaluate
    <expr2>     the second expression to evaluate
    <expr>      the remaining expressions to evaluate
    returns     the value of the second expression
(progn <expr>...)  EXECUTE EXPRESSIONS SEQUENTIALLY
    <expr>      the expressions to evaluate
    returns     the value of the last expression (or nil)

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