| Summary: | Typename function does not return the correct data type of a numeric constant | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Andreas Heinisch <andreas.heinisch> |
| Component: | BASIC | Assignee: | Andreas Heinisch <andreas.heinisch> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | himajin100000, mikekaganski, oliver.brinzing |
| Priority: | medium | ||
| Version: | Inherited From OOo | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=130476 https://bugs.documentfoundation.org/show_bug.cgi?id=131296 |
||
| Whiteboard: | target:6.5.0 | ||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 127592 | ||
|
Description
Andreas Heinisch
2019-12-24 09:26:32 UTC
' 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. |