| www.delorie.com/gnu/docs/calc/calc_339.html | search |
![]() Buy the book! | |
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Anywhere a parameter name can appear in the parameter list you can also use an argument qualifier. Thus the general form of a definition is:
(defmath name (param param...
&optional param param...
&rest param)
body)
|
where each param is either a symbol or a list of the form
(qual param) |
The following qualifiers are recognized:
For example,
(defmath foo (a (constp (not-matrixp b)) &optional (float c)
&rest (integer d))
body)
|
expands to
(defun calcFunc-foo (a b &optional c &rest d)
(and (math-matrixp b)
(math-reject-arg b 'not-matrixp))
(or (math-constp b)
(math-reject-arg b 'constp))
(and c (setq c (math-check-float c)))
(setq d (mapcar 'math-check-integer d))
body)
|
which performs the necessary checks and conversions before executing the body of the function.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |