[Libreoffice-bugs] [Bug 144924] New: Split Basic function return Array Type String, not Variant/String like the oldest version
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Mon Oct 4 20:31:55 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=144924
Bug ID: 144924
Summary: Split Basic function return Array Type String, not
Variant/String like the oldest version
Product: LibreOffice
Version: 7.1.3.2 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: edil at helpidea.net
Sub Main ' LibreOffice 6.3
Dim a
a = Split("5+3", "+") ' a Type Variant(0 to 1); a(0) Type
Variant/String
a(0) = cInt(a(0)) ' --> 5 a(0) Type Variant/Integer
End Sub
Sub Main ' LibreOffice 7.1.3
Dim a
a = Split("5+3", "+") ' a Type String(0 to 1); a(0) Type String
a(0) = cInt(a(0)) ' --> "5" a(0) Type String REMAIN STRING
End Sub
It seems logical to have Array(String) from one String, but ....
Whit new behavior it is impossible to change the Type of items, and worst it is
impossible to make Split(Item) to obtain an Array of Arrays.
Obviously I can create a New Array(Variant) and put there the new values, but
my old macros now give errors, and it is more slow.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20211004/d309e862/attachment.htm>
More information about the Libreoffice-bugs
mailing list