<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Sergei,<div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Just to be clear, your issue does not depend on the usage of macros.</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>See below…</div><div class=""><br class=""></div><div class=""><div class=""><font color="#000000" face="TrebuchetMS" class=""><span style="caret-color: rgb(0, 0, 0);" class="">—————————————————————————————————————————————————————————</span></font></div><div class="">-module test.</div><div class=""><br class=""></div><div class="">-export [print/0].</div><div class=""><br class=""></div><div class="">print() -></div><div class=""> io:format("NUM1: ~p~n", [<b class="">2#01</b>]),</div><div class=""> io:format("NUM2: ~p~n", [<b class="">2#01 bsl 1</b>]),</div><div class=""> io:format("NUM_BOR_PAR: ~p~n", [<b class="">(2#01) bor (2#01 bsl 1)</b>]),</div><div class=""> io:format("NUM_BOR_NO_PAR: ~p~n", [<b class="">2#01 bor 2#01 bsl 1</b>]),</div><div class=""> io:format("NUM_BAND_PAR: ~p~n", [<b class="">(2#01) band (2#01 bsl 1)</b>]),</div><div class=""> io:format("NUM_BAND_NO_PAR: ~p~n", [<b class="">2#01 band 2#01 bsl 1</b>]),</div><div class=""> io:format("NUM_BXOR_PAR: ~p~n", [<b class="">(2#01) bxor (2#01 bsl 1)</b>]),</div><div class=""> io:format("NUM_BXOR_NO_PAR: ~p~n", [<b class="">2#01 bxor 2#01 bsl 1</b>]),</div><div class=""> ok.</div><div class=""><div class=""><font color="#000000" face="TrebuchetMS" class="">—————————————————————————————————————————————————————————</font></div></div><div class=""><font color="#000000" face="TrebuchetMS" class=""><div class="">1> c(test).</div><div class="">{ok,test}</div><div class="">2> test:print().</div><div class="">NUM1: 1</div><div class="">NUM2: 2</div><div class="">NUM_BOR_PAR: 3</div><div class="">NUM_BOR_NO_PAR: 2</div><div class="">NUM_BAND_PAR: 0</div><div class="">NUM_BAND_NO_PAR: 2</div><div class="">NUM_BXOR_PAR: 3</div><div class="">NUM_BXOR_NO_PAR: 0</div><div class="">ok</div></font></div><div class="">
<div style="color: rgb(0, 0, 0); font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div style="font-style: normal; font-family: "Trebuchet MS"; font-size: 14px; font-weight: normal; white-space: normal;" class=""><span id="docs-internal-guid-e691a4cc-056a-0210-b8b7-ea8d87d888ad" class=""><span style="font-size: 11pt; font-family: Arial; font-weight: 700; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;" class=""><span style="font-family: TrebuchetMS; font-size: 12px; font-weight: normal; white-space: normal;" class="">—————————————————————————————————————————————————————————</span></span></span></div><div style="font-style: normal;" class=""><span style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; vertical-align: baseline;" class=""><font face="TrebuchetMS" class=""><br class=""></font></span></div><div style="font-style: normal;" class="">Your issue is predicated entirely on the operator precedence and you can find documentation about it here:</div><div style="font-style: normal;" class=""><a href="http://erlang.org/doc/reference_manual/expressions.html#operator-precedence" class="">http://erlang.org/doc/reference_manual/expressions.html#operator-precedence</a></div><div style="font-style: normal;" class=""><br class=""></div><div style="font-style: normal;" class="">The important bit there is: </div><table class="doc-table" style="font-style: normal; border-collapse: collapse; min-width: 50%; margin: 0px auto; border: 1px solid rgb(102, 102, 102); font-size: 0.7em; font-family: sans-serif; orphans: 2; widows: 2; background-color: rgb(254, 254, 254);"><tbody class=""><tr style="background-color: rgb(245, 245, 245);" class=""><td align="left" valign="middle" style="border: 1px solid rgb(102, 102, 102); padding: 0.5em;" class="">+ - bor bxor bsl bsr or xor</td><td align="left" valign="middle" style="border: 1px solid rgb(102, 102, 102); padding: 0.5em;" class="">Left associative</td></tr></tbody></table><div style="font-style: normal;" class=""><br class=""></div><div class="">That means that <i class="">X band Y bsl Z</i><span style="font-style: normal;" class=""> is not the same as (</span><i class="">X band (Y bsl Z))</i><span style="font-style: normal;" class=""> but (</span><i class="">(X band Y) bsl Z)</i><span style="font-style: normal;" class="">.</span></div><div class=""><span style="font-style: normal;" class=""><br class=""></span></div><div class=""><span style="font-style: normal;" class="">Hope this helps :)</span></div><div style="font-style: normal;" class=""><span style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; vertical-align: baseline;" class=""><font face="TrebuchetMS" class=""><br class=""></font></span></div><div style="font-style: normal;" class=""><span style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; vertical-align: baseline;" class=""><font face="TrebuchetMS" class="">Cheers!</font></span></div><div style="font-style: normal;" class=""><span style="font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; vertical-align: baseline;" class=""><font face="TrebuchetMS" class=""><br class="Apple-interchange-newline"></font><hr style="font-family: Arial; font-size: 11pt; font-weight: 700; white-space: pre-wrap;" class=""></span><div style="font-family: "Trebuchet MS"; font-size: 14px; font-weight: normal; white-space: normal;" class=""><b class=""><i class=""><a href="http://about.me/elbrujohalcon" class="">Brujo Benavides</a></i></b></div></div></div><div style="color: rgb(0, 0, 0); font-family: 'Trebuchet MS'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><b class=""><br class=""></b></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 7 Jun 2019, at 08:03, DOBRO Sergei <<a href="mailto:chessvegas@chessvegas.com" class="">chessvegas@chessvegas.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">-module(test).</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> </div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">-export([print/0]).</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> </div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">-define(NUM1, 2#01).</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">-define(NUM2, ?NUM1 bsl 1).</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> </div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">-define(NUM_BOR_PAR, (?NUM1) bor (?NUM2)).</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">-define(NUM_BOR_NO_PAR, ?NUM1 bor ?NUM2).</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> </div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">-define(NUM_BAND_PAR, (?NUM1) band (?NUM2)).</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">-define(NUM_BAND_NO_PAR, ?NUM1 band ?NUM2).</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> </div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">-define(NUM_BXOR_PAR, (?NUM1) bxor (?NUM2)).</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">-define(NUM_BXOR_NO_PAR, ?NUM1 bxor ?NUM2).</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> </div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">print() -></div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> io:format("NUM1: ~p~n", [?NUM1]),</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> io:format("NUM2: ~p~n", [?NUM2]),</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> io:format("NUM_BOR_PAR: ~p~n", [?NUM_BOR_PAR]),</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> io:format("NUM_BOR_NO_PAR: ~p~n", [?NUM_BOR_NO_PAR]),</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> io:format("NUM_BAND_PAR: ~p~n", [?NUM_BAND_PAR]),</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> io:format("NUM_BAND_NO_PAR: ~p~n", [?NUM_BAND_NO_PAR]),</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> io:format("NUM_BXOR_PAR: ~p~n", [?NUM_BXOR_PAR]),</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> io:format("NUM_BXOR_NO_PAR: ~p~n", [?NUM_BXOR_NO_PAR]),</div><div style="caret-color: rgb(0, 0, 0); font-family: TrebuchetMS; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""> ok.</div></div></blockquote></div><br class=""></div></body></html>