Ask Your Question

Unsigned numeric variables not implemented in LO Basic?

asked 2016-10-19 15:06:09 +0200

skagon gravatar image

I'm trying to transfer a code segment from C++ into LibreOffice Basic and I've experienced a number of features and functions missing from LO Basic. One of them is the unsigned types of variables (Int, Long, Single, Double). Is there really no unsigned type in LO Basic, or am I somehow blind?

As I'm (very) new here, please forgive me if this has been covered before.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2016-10-19 19:40:53 +0200

mark_t gravatar image

I don't think unsigned types are available. Also not available in VBA so not possible to try using "Option Compatible".

You might consider creating a dll for your low level functions that require bitwise manipulation of this type, although only the LibreOffice Basic types could be passed and returned. Lack of LongPtr for 64 bit word handling could be a problem unless you misuse Double, Date or Currency types.

edit flag offensive delete link more


Yes, unfortunately you're right. I've (re)written a number of basic functions to offset this deficiency. It seems LibreOffice Basic is trying really hard to hide the raw data from users. The only things that seem to work properly bit-wise are the very basic Boolean operators -- AND, OR, XOR etc. I would like to see some more low-level functionality in LO Basic. Thanks for the answers, though!

skagon gravatar imageskagon ( 2016-10-26 00:45:22 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2016-10-19 15:06:09 +0200

Seen: 61 times

Last updated: Oct 19 '16