[Libreoffice-bugs] [Bug 131241] Hex value gives negative long / single / double number

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Mar 11 10:40:35 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=131241

--- Comment #1 from Spiros Georgaras <sng at hellug.gr> ---
This is probably due to
https://wiki.documentfoundation.org/ReleaseNotes/6.4#BASIC

Macros: When converting Hex strings of negative value, treat the high-order bit
always as sign bit, e.g., &H8000 = -2^15, &HFFFF = -1, and &H7FFFFFFF = 2^31-1.
Behaviour is identical in either modes, i.e., LibO Basic, with Option
Compatible, and Option VBA Support 0/1. tdf#62326 (Andreas Heinisch)

So, this is not a bug, but the only way to get around it is to use

aLong = CLng("&HFFE0")

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200311/38ebb38e/attachment.htm>


More information about the Libreoffice-bugs mailing list