Bug 103339

Summary: Implement bitwise shift operators in LO BASIC
Product: LibreOffice Reporter: skagon
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: enhancement CC: 79045_79045, ilmari.lauhakangas, klasse
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107659    

Description skagon 2016-10-19 21:23:51 UTC
There are no bitwise shifts operators (or functions) in LibreOffice BASIC. I believe it would be highly beneficial if they were to be implemented.

Of course, I am talking about the equivalent to the C/C++ operators << and >>.

Also note that bitwise shift functions exist in Calc (BITLSHIFT, BITRSHIFT), however, for some strange reason, there's no such functionality in BASIC.
Comment 1 Johnny_M 2016-10-23 13:26:14 UTC
Just for information: MS Office's VBA doesn't support those either. Here is a workaround: http://www.excely.com/excel-vba/bit-shifting-function.shtml
Comment 2 Buovjaga 2016-11-11 20:43:29 UTC
I guess you are right -> NEW
Comment 3 Stéphane Guillou (stragu) 2021-05-29 23:55:44 UTC
MS Virtual Basic has them, also using "<<" and ">>": https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/operators/bit-shift-operators