Description: Steps to Reproduce: The following snippet shows the error in detail: Sub Main dim intDecimal as integer intDecimal = 32767 dim intHexDecimal as integer intHexDecimal = &h7FFF dim lngDecimal as long lngDecimal = 1048575 dim lngHexDecimal as long lngHexDecimal = &hFFFFF ' outputs 32767 32767 1048575 1048575 Print intDecimal, intHexDecimal, lngDecimal, lngHexDecimal ' outputs Integer Integer Long Long Print Typename(intDecimal), Typename(intHexDecimal), Typename(lngDecimal), Typename(lngHexDecimal) ' outputs Integer Integer Doube Double Print Typename(32767), Typename(&h7FFF), Typename(1048575), Typename(&hFFFFF) End Sub Actual Results: Expected Results: Reproducible: Always User Profile Reset: No Additional Info:
' outputs Integer Integer Doube Double Print Typename(32767), Typename(&h7FFF), Typename(1048575), Typename(&hFFFFF) The output of the above line should be Integer Integer Long Long. The code lies in: SbiRuntime::StepLOADNC https://opengrok.libreoffice.org/xref/core/basic/source/runtime/runtime.cxx?r=62f3f3d9#2774
Version: 6.5.0.0.alpha0+ (x64) Build ID: aeab5bfa024f7d15099730fa536d78b5a7a7ea01 CPU threads: 6; OS: Windows 10.0 Build 17134; UI render: GL; VCL: win; Locale: de-DE (de_DE); UI-Language: en-US Calc: CL
already reproducibel with AOO 4.1.5
U-DESKTOP-8OSNV7R\DrRobotto committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/0b4f8bf571baf2ccd5a8aafdc4deb41867420be3 tdf#129596 Distinguish between integer and long while loading immediate values It will be available in 6.5.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
By the way: > print TypeName(&h00ff&) must give Long.
FTR: the data type characters are mentioned under corresponding subsections (for Currency, Double, Integer, Long, LongLong, Single, String, and Variant (the latter mentioning there's no such character)) under https://docs.microsoft.com/en-us/office/vba/Language/Reference/User-Interface-Help/data-type-summary Likely a separate bug report needed.