17.05.2015 Views

zl:1 - FTP

zl:1 - FTP

zl:1 - FTP

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

613<br />

warn<br />

Example:<br />

(setq to-string<br />

(array-push-portion-extend<br />

to-string from-string (or from B) to»<br />

If the optional arguments are not provided, the default is to copy all of<br />

from-array to the end of to-array.<br />

warn optional-options optional-condition-name format-string &rest Function<br />

format-args<br />

If the flag *break-on-warnings* is nil, warn prints a warning message<br />

without entering the Debugger. .<br />

If the flag, *break-on-warnings* is not nil, warn enters the Debugger and<br />

prints the warning message. If you continue from the error, warn returns<br />

args.<br />

The optional arguments optional-options and optional-condition-name can be<br />

omitted. They represent more advanced features of warn, the documentation<br />

of which is being deferred.<br />

format-string is an error message string.<br />

format-args are additional arguments; these are evaluated only if a condition<br />

is signalled.<br />

Examples:<br />

(defun sum-numbers (list-of-numbers)<br />

(when « (length list-of-numbers) 2)<br />

(warn ·You are trying to only add -0 number-:P.­<br />

(length list-of-numbers»)<br />

(reduce #'+ list-of-numbers» => SUM-NUMBERS<br />

(sum-numbers '(1»<br />

=> Warning: You are trying to only add 1 number.<br />

(setq *break-on-warnings* t) => T<br />

(sum-numbers '(1»=><br />

Warning: You are trying to only add 1 number<br />

I

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

Saved successfully!

Ooh no, something went wrong!