On Dec 14, 8:33 am, Bram Moolenaar <[email protected]> wrote: > Patch 7.3.377 > Problem: No support for bitwise AND, OR, XOR and invert. > Solution: Add add(), or(), invert() and xor() functions. > Files: src/eval.c, src/testdir/test49.in, src/testdir/test65.in, > src/testdir/test65.ok, runtime/doc/eval.txt >
A couple of things: 1. I note that the new functions are missing from :help function-list (probably they should be under a new subheading, like "integer computation" or "bitwise computation" similar to "floating point computation"). 2. I note that no shift operators were defined. So now the easiest way to do the shifting if needed is by multiplying or dividing by powers of 2. But I just realized pow() is a floating-point function, making a shift much more expensive than it needs to be, if this function is used. I could not find a good way to get arbitrary (integer) powers of 2 with Vim functions/syntax. Can we either add the shift operators, or add the ability to do integer exponentiation? -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
