Date: prev next · Thread: first prev next last
2017 Archives by date, by thread · List index

On 06/08/2017 10:30 AM, Regina Henschel wrote:
in looking at 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("")
and later on

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.

<> "Cater for UNO (signed) vs. BASIC (unsigned) byte mismatch"

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
All messages sent to this list will be publicly archived and cannot be deleted


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.