Thank you,<br><br>I am sorry it was a silly mistake and it was indeed a misplaced semicolon.<br><br><div class="gmail_quote">On Wed, Apr 2, 2008 at 9:28 PM, Hasan Veldstra <<a href="mailto:hasan.veldstra@gmail.com">hasan.veldstra@gmail.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
-define(OP_NAME(OpId),<br>
if<br>
...............<br>
...............<br>
end).<br>
<br>
<br>
when I try to compile the i get an error<br>
./trial.erl:7: syntax error before: 'end'<br>
./trial.erl:3: function getval/1 undefined<br>
<br>
Please let me know how I should use macros in this way.<br>
</blockquote>
<br></div>
There's a syntax error somewhere between 'if' and 'end' in your macro definition, can't tell more without the source. Quite likely to be a misplaced semi-colon though...<br>
</blockquote></div><br><br clear="all"><br>-- <br>Balathasan Sayanthan