|
|
ru.perl- RU.PERL ---------------------------------------------------------------------- From : pavel kurnosoff 2:5030/1061 12 Jan 2002 03:52:54 To : Artem Chuprina Subject : вопросик --------------------------------------------------------------------------------
R>> В lisp'е наряду с defun есть defmacro (не помню точно, в каких
R>> версиях), самые развитые макросы из всех возможных, синтаксис
R>> ограничивается только синтаксисом самого lisp'а.
AC> А чем оно отличается от defun? Hу не сложилось у меня как-то выучить
AC> лисп...
`defmacro' is a built-in function
Documentation:
(defmacro NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro.
The definition is (macro lambda ARGLIST [DOCSTRING] BODY...).
When the macro is called, as in (NAME ARGS...),
the function (lambda ARGLIST BODY...) is applied to
the list ARGS... as it appears in the expression,
and the result should be a form to be evaluated instead of the original.
`defun' is a built-in function
Documentation:
(defun NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function.
The definition is (lambda ARGLIST [DOCSTRING] BODY...).
See also the function `interactive'.
и насчёт "самых развитых из всех возможных" я бы поостерёгся. даже в m4 есть
похожая функциональность. да и в perl вобщем-то тоже не проблема создать
подобную defmacro.
.pk
--- np: silence
* Origin: there's no tomorrow (2:5030/1061)
Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.perl/27373c3f7c3e.html, оценка из 5, голосов 10
|