https://bugs.freedesktop.org/show_bug.cgi?id=42492
--- Comment #1 from irs <[email protected]> 2011-11-01 19:28:57 PDT --- Sub SampleCodeOfHexProblemFor64Bit ' Issue 1: The HEX return string of negative long integers is missing ' the least significant nibble. ' Only the first 15 characters are being returned, instead of a total of 16. dim longTemp as long longTemp = -1 msgbox HEX(longTemp) & " : " & Cstr(Len(HEX(longTemp)) ' Returns: FFFFFFFFFFFFFFF : 15 ' should be: FFFFFFFFFFFFFFFF : 16 longTemp = - 17 msgbox HEX(longTemp) & " : " & Cstr(Len(HEX(longTemp)) ' Returns: FFFFFFFFFFFFFFE : 15 ' should be: FFFFFFFFFFFFFFEF : 16 longTemp = - 32768 msgbox HEX(longTemp) & " : " & Cstr(Len(HEX(longTemp)) ' Returns: FFFFFFFFFFFF800 : 15 ' Should be: FFFFFFFFFFFF8000 : 16 longTemp = - 32769 msgbox HEX(longTemp) & " : " & Cstr(Len(HEX(longTemp)) ' Returns: FFFFFFFFFFFF7FF : 15 ' should be: FFFFFFFFFFFF7FFF : 16 longTemp = - 32785 msgbox HEX(longTemp) & " : " & Cstr(Len(HEX(longTemp)) ' Returns: FFFFFFFFFFFF7FE : 15 ' should be: FFFFFFFFFFFF7FEF : 16 '=== ' Issue 2: The HEX return of negative short integers is 8 hex characters. ' Possibly this is the way the HEX string is supposed to be returned? ' Maybe on a 64-bit system they should be being returned as 16 hex characters. dim integerTemp as integer integerTemp = -1 msgbox HEX(integerTemp) & " : " & Cstr(Len(HEX(integerTemp)) ' Returns: FFFFFFFF : 8 ' On 64-bit system should it return as: FFFFFFFFFFFFFFFF : 16 ? integerTemp = -17 msgbox HEX(integerTemp) & " : " & Cstr(Len(HEX(integerTemp)) ' Returns: FFFFFFEF : 8 ' On 64-Bit system should it return as FFFFFFFFFFFFFFEF : 16 ? integerTemp = -32768 '<--- Highest possible negative 16-bit signed integer msgbox HEX(integerTemp) & " : " & Cstr(Len(HEX(integerTemp)) ' Returns: FFFF8000 : 8 ' On 64-Bit system should it return as FFFFFFFFFFFF8000 : 16 ? end sub -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Libreoffice-bugs mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs
