We will be migrating from Ask to Discourse on the first week of August, read the details here

Ask Your Question
0

Bitwise shifts not implemented in LO Basic? [closed]

asked 2016-10-19 15:16:08 +0200

skagon gravatar image

This is the second question I've got here; in short, trying to transfer a code segment from C++ to LibreOffice Basic, and some functions and features seem to be not implemented.

For this particular question: while there are bitwise shift functions for Calc (BITLSHIFT, BITRSHIFT), there's no such function or operand in LO Basic.

Obviously, what I mean are the C/C++ operators << and >> as in:

a = b << c;     //left shift
d = e >> f;     //right shift

Could someone please let me know if I've overlooked something, or if it's indeed missing? Also, since I'm rather new here, is there any place I can file a "bug" report so that it's considered for future implementation? Thanks!

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-09-13 22:28:05.311578

1 Answer

Sort by » oldest newest most voted
0

answered 2016-10-19 19:17:03 +0200

mark_t gravatar image

Bugs and enhancement requests should be made at LIbreOffice Bugzilla. Please search first to avoid creating duplicates.

On page 72 In the book OOME from Andrew Pitonyak's site, is mentioned a workaround for shift by checking the sign and using divide by 2.

You could also call the worksheet functions from basic, see page 525 chapter 15.10 in the book.

edit flag offensive delete link more

Comments

Great help that book you linked, thanks a lot! I have written my own left/right signed/unsigned shift functions, having no other alternative, for now. I'd make my own DLL with functions too, but I don't think it's worth the trouble. Still living in hope that the powers that be add this functionality in the future. Thanks a lot for the answer!

skagon gravatar imageskagon ( 2016-10-26 00:49:37 +0200 )edit

For anyone ending up here and wondering if the feature was indeed requested on the bug tracker, @skagon has created this feature request: https://bugs.documentfoundation.org/s...

chtfn gravatar imagechtfn ( 2021-05-30 01:33:34 +0200 )edit

Question Tools

1 follower

Stats

Asked: 2016-10-19 15:16:08 +0200

Seen: 287 times

Last updated: Oct 19 '16