I can reproduce your issue on LO 220.127.116.11 on Fedora 35.
Not 100% familiar with LO Basic, but this code works:
dim myArray (5) As Long
for i = 0 to 5
myArray (i) = i
ReDim Preserve myArray (4)
It seems the Array() function you are using returns something that
cannot be ReDim'ed, which may explain your observation.
I hope this helps.
Le dimanche 10 juillet 2022 à 20:02 +0200, Johnny Rosenberg a écrit :
Is this a bug or is my brain just not working?
*Sub ResizeArrayTest Dim MyArray(5) As Long MyArray=Array(1,
4, 5, 6) ReDim Preserve MyArray(4)End Sub*
Running this creates the array MyArray, but it's *empty*, so it seems
*Preserve*” doesn't work here. Or what am I doing wrong? I'm sure I
got Preserve to work many times before, but maybe my brain crashed
Using LibreOffice 18.104.22.168 on Ubuntu Studio 20.04.
To unsubscribe e-mail to: firstname.lastname@example.org
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Impressum (Legal Info)
: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (MPLv2
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our trademark policy