<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Sergey<div><br></div><div>It is clear that the connversion of signed16 —> signed32 max have the effect you described. However, in UDP/TCP messages you only transfer 16 bits of the port, so the status of the higher bits should not matter.</div><div><br></div><div>If the remPort was signed16, I strongly assume locPort was signed16 as well.</div><div>So why in one case explicit, in the other case implicit.</div><div>The code does not make sense to me unless remPort and locPort had  different types.</div><div><br><div dir="ltr">br<br><div>Jörg</div></div><div dir="ltr"><br><blockquote type="cite">Am 04.07.2023 um 18:52 schrieb Sergey Durmanov <serge.durmanov@yandex.ru>:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div>Hi,.</div><div>because previously signed types were used for ports, and the remote port number could be greater than max(signed16), causing the sign bit to propagate. this code is now unnecessary.<br></div><div><br></div><div>02.07.2023, 22:52, "Joerg" <joerg.straube@iaeth.ch>:</div><blockquote><p>Hi<br><br>I can‘t answer the question, why the author of this source code uses „remPort“ with an explicit conversion and „locPort“ with the implicit conversion, the compiler generates.<br><br>br<br>Jörg<br></p><span class="f55bbb4eeef208e8wmi-sign"><a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a></span></blockquote>
<span>--</span><br><span>Oberon@lists.inf.ethz.ch mailing list for ETH Oberon and related systems</span><br><span>https://lists.inf.ethz.ch/mailman/listinfo/oberon</span><br></div></blockquote></div></body></html>