Hi,<br><br>I tried do the following using macros<br clear="all">///////////////////////////////////////<br>-module(trial).<br>-include("xx.hrl").<br><br>getval(OpId) -><br>    Oe = ?OP_NAME(OpId),<br>    {ok, Oe}.<br>
<br>////////////////////////////////////////<br><br>and within the xx.hrl<br><br>i have some thing like<br><br>-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><br>regards,<br><br><br><br>-- <br>Balathasan Sayanthan