Bug 162367 - Basic Hexadecimal constants ill converted in Long variables if value greater than &H7FFF
Summary: Basic Hexadecimal constants ill converted in Long variables if value greater ...
Status: RESOLVED DUPLICATE of bug 142048
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
24.2.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-06 05:25 UTC by Corneloup
Modified: 2024-08-06 06:06 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Corneloup 2024-08-06 05:25:02 UTC
Description:
The Basic interpreter convert hexadecimal values in the shorter format possible : 16 bits if possible, even in a Long variable
For instance it is not possible to define a color in a constant with a null red component as RGB() function is unavailable in a constant definition.
Here is a code to demonstrate the problem :
	Dim J as Long, L as Long
	J = &H00008000
	L = &H00018000
	Msgbox "J=" & J & " L=" & L



Steps to Reproduce:
1.Dim J as Long : J = &H00008000
2.
3.

Actual Results:
-32768

Expected Results:
+32768


Reproducible: Always


User Profile Reset: No

Additional Info:
none
Comment 1 Mike Kaganski 2024-08-06 06:06:45 UTC

*** This bug has been marked as a duplicate of bug 142048 ***