17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

107 condition-call-if<br />

(condition-call 0 ... )<br />

condition-cali And :no-error<br />

As a special case, predicate-m (the last one) can be the special symbol<br />

:no-error. If form is evaluated and no error is signalled during the evaluation,<br />

condition-case executes the :no-error clause instead of returning the<br />

values returned by form. The variables vars are bouna to the values<br />

produced by form, in the style of multiple-value-bind, so that they can be<br />

. accessed by the body of the :no-error case. Any extra variables are bound<br />

to nil.<br />

Some limitations on predicates:<br />

• Predicates must not have side effects. The number of times that the<br />

signalling mechanism chooses to invoke the predicates and the order<br />

in which it invokes them are not defined. For side effects in the<br />

dynamic environment of the signal, use condition-bind.<br />

• The predicates are not lexical closures and therefore cannot access<br />

variables of the lexically containing form, unless those variables are<br />

declared special.<br />

• Lambda-expression predicates are not compiled.<br />

The conditional variant of condition-call is the form:<br />

condi tion-calI-if<br />

For a table of related items: See the section "Basic Forms for Bound<br />

Handlers" in Symbolics Common Lisp: Language Concepts.<br />

I<br />

condition-call-if cond-form (&rest varlist) form &body clauses Special Form<br />

condition-call-if binds its handlers conditionally. In all other respects, it is<br />

just like condition-call. Its format includes cond-form, the subform that<br />

controls binding handlers:<br />

(condi t i on-call-i f cond-form (var)<br />

form<br />

(predicate-I form-I-I form-I-2 ... form-I-n)<br />

(predicate-2 form-2-I form-2-2 ... form-2-n)<br />

(predicate-m form-m-l form-m-2 ... form-m-n))<br />

condition-call-if iust evaluates cond-form. If the result is nil, it does not<br />

set up any handlers; it just evaluates the form. If the result is not nil, it<br />

continues just like condition-call, binding the handlers and evaluating the<br />

form.<br />

The :no-error clause applies whether or not cond-form is nil.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!