Hi all,
in looking at https://ask.libreoffice.org/de/question/97628/base64-encodedecode/ I came across a problem with type "byte" in Basic and do not know whether it is a bug or not:
I want to write bytes to a file.
I use
dim oOutputStream as variant
oOutputStream = createUnoService("com.sun.star.io.SequenceOutputStream")
and later on
oOutputStream.writeBytes(...)
If I define dim nA as byte
then nA = 195 is OK, but writeBytes(array(nA)) fails
and nA = -61 fails, but writeBytes(array(-61)) works.
It seems a variable of type byte can have values in range [0..255], but writeBytes can only use values in range [-128..127].
I have used dim nA as variant in the end, but wonder about the different ranges.
Kind regards
Regina