03-10-2011, 07:25 PM
boriel Wrote:Hmmm. I'm afraid not. This is a feature, the same way as in C, due to truncation. c1 is always uByte and you can't gues in compile time it's value, so there might be a chance that, effectively, c1 * 9 > 255. C does the same. What you get is (PEEK(x) * 9 bAND 0xFFh)I understand, never meet such a problem in HiSoft BASIC, maybe because it has no BYTE/UBYTE type but INTEGER/UINTEGER, FLOAT and STRING. But good explaination.
boriel Wrote:I will check priorities, but I used C/C++ priorities. According to this Wikipedia article << and >> has lower priority than + and -If I remember correctly, the Priority in FreeBASIC is that shifting (SHL/SHR) has higher priority than addition, only shifting and assigment (SHL=/SHR=) has very very low priority.
...I found only german priority list of FreeBASIC:
<!-- m --><a class="postlink" href="http://www.freebasic-portal.de/befehlsreferenz/ausdruecke-operatoren-384.html">http://www.freebasic-portal.de/befehlsr ... n-384.html</a><!-- m -->
------------------------------------------------------------
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!
http://lcd-one.da.ru redirector is dead
Visit my http://members.inode.at/838331/index.html home page!