<div>... and thanks a lot! You saved me :)</div><div> </div><div>07.06.2019, 14:13, "Brujo Benavides" <elbrujohalcon@gmail.com>:</div><blockquote><div style="word-wrap:break-word">Hi Sergei,<div> </div><div>Just to be clear, your issue does not depend on the usage of macros.</div><div>See below…</div><div> </div><div><div><font color="#000000" face="TrebuchetMS">—————————————————————————————————————————————————————————</font></div><div>-module test.</div><div> </div><div>-export [print/0].</div><div> </div><div>print() -></div><div>    io:format("NUM1: ~p~n", [<strong>2#01</strong>]),</div><div>    io:format("NUM2: ~p~n", [<strong>2#01 bsl 1</strong>]),</div><div>    io:format("NUM_BOR_PAR: ~p~n", [<strong>(2#01) bor (2#01 bsl 1)</strong>]),</div><div>    io:format("NUM_BOR_NO_PAR: ~p~n", [<strong>2#01 bor 2#01 bsl 1</strong>]),</div><div>    io:format("NUM_BAND_PAR: ~p~n", [<strong>(2#01) band (2#01 bsl 1)</strong>]),</div><div>    io:format("NUM_BAND_NO_PAR: ~p~n", [<strong>2#01 band 2#01 bsl 1</strong>]),</div><div>    io:format("NUM_BXOR_PAR: ~p~n", [<strong>(2#01) bxor (2#01 bsl 1)</strong>]),</div><div>    io:format("NUM_BXOR_NO_PAR: ~p~n", [<strong>2#01 bxor 2#01 bsl 1</strong>]),</div><div>    ok.</div><div><div><font color="#000000" face="TrebuchetMS">—————————————————————————————————————————————————————————</font></div></div><div><div><font color="#000000" face="TrebuchetMS">1> c(test).</font></div><div><font color="#000000" face="TrebuchetMS">{ok,test}</font></div><div><font color="#000000" face="TrebuchetMS">2> test:print().</font></div><div><font color="#000000" face="TrebuchetMS">NUM1: 1</font></div><div><font color="#000000" face="TrebuchetMS">NUM2: 2</font></div><div><font color="#000000" face="TrebuchetMS">NUM_BOR_PAR: 3</font></div><div><font color="#000000" face="TrebuchetMS">NUM_BOR_NO_PAR: 2</font></div><div><font color="#000000" face="TrebuchetMS">NUM_BAND_PAR: 0</font></div><div><font color="#000000" face="TrebuchetMS">NUM_BAND_NO_PAR: 2</font></div><div><font color="#000000" face="TrebuchetMS">NUM_BXOR_PAR: 3</font></div><div><font color="#000000" face="TrebuchetMS">NUM_BXOR_NO_PAR: 0</font></div><div><font color="#000000" face="TrebuchetMS">ok</font></div></div><div><div style="color:rgb( 0 , 0 , 0 );text-transform:none;word-spacing:0px"><div style="font-family:'trebuchet ms';font-size:14px;font-style:normal;font-weight:normal;white-space:normal"><strong style="font-family:'arial';font-size:11pt;font-weight:700;vertical-align:baseline;white-space:pre-wrap"><span style="font-family:'trebuchetms';font-size:12px;font-weight:normal;white-space:normal">—————————————————————————————————————————————————————————</span></strong></div><div style="font-style:normal"> </div><div style="font-style:normal">Your issue is predicated entirely on the operator precedence and you can find documentation about it here:</div><div style="font-style:normal"><a href="http://erlang.org/doc/reference_manual/expressions.html#operator-precedence">http://erlang.org/doc/reference_manual/expressions.html#operator-precedence</a></div><div style="font-style:normal"> </div><div style="font-style:normal">The important bit there is: </div><table style="background-color:rgb( 254 , 254 , 254 );border-bottom-color:rgb( 102 , 102 , 102 );border-bottom-style:solid;border-bottom-width:1px;border-collapse:collapse;border-left-color:rgb( 102 , 102 , 102 );border-left-style:solid;border-left-width:1px;border-right-color:rgb( 102 , 102 , 102 );border-right-style:solid;border-right-width:1px;border-top-color:rgb( 102 , 102 , 102 );border-top-style:solid;border-top-width:1px;font-family:sans-serif;font-size:0.7em;font-style:normal;margin-bottom:0px;margin-left:auto;margin-right:auto;margin-top:0px;min-width:50%"><tbody><tr style="background-color:rgb( 245 , 245 , 245 )"><td align="left" valign="middle" style="border-bottom-color:rgb( 102 , 102 , 102 );border-bottom-style:solid;border-bottom-width:1px;border-left-color:rgb( 102 , 102 , 102 );border-left-style:solid;border-left-width:1px;border-right-color:rgb( 102 , 102 , 102 );border-right-style:solid;border-right-width:1px;border-top-color:rgb( 102 , 102 , 102 );border-top-style:solid;border-top-width:1px;padding-bottom:0.5em;padding-left:0.5em;padding-right:0.5em;padding-top:0.5em">+ - bor bxor bsl bsr or xor</td><td align="left" valign="middle" style="border-bottom-color:rgb( 102 , 102 , 102 );border-bottom-style:solid;border-bottom-width:1px;border-left-color:rgb( 102 , 102 , 102 );border-left-style:solid;border-left-width:1px;border-right-color:rgb( 102 , 102 , 102 );border-right-style:solid;border-right-width:1px;border-top-color:rgb( 102 , 102 , 102 );border-top-style:solid;border-top-width:1px;padding-bottom:0.5em;padding-left:0.5em;padding-right:0.5em;padding-top:0.5em">Left associative</td></tr></tbody></table><div style="font-style:normal"> </div><div>That means that <em>X band Y bsl Z</em><span style="font-style:normal"> is not the same as (</span><em>X band (Y bsl Z))</em><span style="font-style:normal"> but (</span><em>(X band Y) bsl Z)</em><span style="font-style:normal">.</span></div><div> </div><div><span style="font-style:normal">Hope this helps :)</span></div><div style="font-style:normal"> </div><div style="font-style:normal"><span style="vertical-align:baseline"><font face="TrebuchetMS">Cheers!</font></span></div><div style="font-style:normal"> <hr style="font-family:'arial';font-size:11pt;font-weight:700;white-space:pre-wrap" /><div style="font-family:'trebuchet ms';font-size:14px;font-weight:normal;white-space:normal"><em><strong><a href="http://about.me/elbrujohalcon">Brujo Benavides</a></strong></em></div></div></div><div style="color:rgb( 0 , 0 , 0 );font-family:'trebuchet ms';font-size:14px;font-style:normal;font-weight:normal;text-transform:none;white-space:normal;word-spacing:0px"> </div></div><div> <blockquote><div>On 7 Jun 2019, at 08:03, DOBRO Sergei <<a href="mailto:chessvegas@chessvegas.com">chessvegas@chessvegas.com</a>> wrote:</div> <div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">-module(test).</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">-export([print/0]).</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">-define(NUM1, 2#01).</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">-define(NUM2, ?NUM1 bsl 1).</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">-define(NUM_BOR_PAR, (?NUM1) bor (?NUM2)).</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">-define(NUM_BOR_NO_PAR, ?NUM1 bor ?NUM2).</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">-define(NUM_BAND_PAR, (?NUM1) band (?NUM2)).</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">-define(NUM_BAND_NO_PAR, ?NUM1 band ?NUM2).</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">-define(NUM_BXOR_PAR, (?NUM1) bxor (?NUM2)).</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">-define(NUM_BXOR_NO_PAR, ?NUM1 bxor ?NUM2).</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">print() -></div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">    io:format("NUM1: ~p~n", [?NUM1]),</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">    io:format("NUM2: ~p~n", [?NUM2]),</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">    io:format("NUM_BOR_PAR: ~p~n", [?NUM_BOR_PAR]),</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">    io:format("NUM_BOR_NO_PAR: ~p~n", [?NUM_BOR_NO_PAR]),</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">    io:format("NUM_BAND_PAR: ~p~n", [?NUM_BAND_PAR]),</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">    io:format("NUM_BAND_NO_PAR: ~p~n", [?NUM_BAND_NO_PAR]),</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">    io:format("NUM_BXOR_PAR: ~p~n", [?NUM_BXOR_PAR]),</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">    io:format("NUM_BXOR_NO_PAR: ~p~n", [?NUM_BXOR_NO_PAR]),</div><div style="font-family:'trebuchetms';font-size:12px;font-style:normal;font-weight:normal;text-decoration-line:none;text-transform:none;white-space:normal;word-spacing:0px">    ok.</div></div></blockquote></div></div></div></blockquote>