Hi Raoul,<br><br>As yet there are symbol macros in lfe, i.e. you cannot do the same as with -define() and define an atom to expand into an expression as for example:<br><br>-define(foo, "foo bar").<br><br>As yet you can only define macro forms:<br>
<br>(defmacro foo () '"foo bar")<br><br>which you would call by (foo). Note that you can use macros anywhere, even in patterns. If being able to define symbol macros is important for you I will consider adding them.<br>
<br>There are two sets of defining macros in LFE: an older scheme inspired set which is not supported any more and will be phased out; and a newer CL inspired set. The CL based set does include a scheme inspired syntax-rule macro definer, called defsyntax, as this is practical for simple expansion macros.<br>
<br>The User Guide describes (briefly) the CL inspired defining macro set.<br><br>Robert<br><br><div class="gmail_quote">2008/12/16 Raoul Duke <span dir="ltr"><<a href="mailto:raould@gmail.com">raould@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">hi,<br>
<br>
lfe seems to be quite rich when it comes to macro forms; might anybody<br>
know which one should i use to duplicate erl-style "-define()"? i<br>
tried (define (foo1 "foo2")) and some variations but get<br>
{n,lfe_lint,unknown_form}.<br>
<br>
thank you.<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br>