Bug 147379 - Implement LongLong data type in Basic
Summary: Implement LongLong data type in Basic
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-11 15:30 UTC by Mike Kaganski
Modified: 2022-07-08 03:22 UTC (History)
4 users (show)

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 Mike Kaganski 2022-02-11 15:30:23 UTC
Basic misses a publicly available 64-bit integer type. This is problematic in several aspects.

1. It limits the calculation range.
2. It breaks compatibility with VBA [1].
3. It disallows using external API that uses 64-bit integral types or pointers (like window handling WinAPI that operates with HANDLE, which is platform-dependent type which size is equal to respective platform pointer size).
4. It makes it problematic to use UNO API that works with 'hyper' UNO type [2].

But the code to handle 64-bit data is already there (at least to some extent): e.g., see [3].

We need to add respective keyword, type character, conversion functions, etc. to make it first-class type among other available types.

[1] https://docs.microsoft.com/en-us/office/vba/Language/Reference/User-Interface-Help/longlong-data-type
[2] https://opengrok.libreoffice.org/search?full=hyper&path=idl&project=core
[3] https://opengrok.libreoffice.org/xref/core/basic/source/sbx/sbxint.cxx?r=840b4eb2#314
Comment 1 Xisco Faulí 2022-02-16 15:46:40 UTC
@Andreas, I thought you might be interested in this issue