Hi there,
If an array has one empty element, ooobasic ignores it, if it's the second element.
This causes a problem in a few different ways.
for example when I try to calculate ubound. Lets say I have two arrays as
obj1 = array(1,)
obj2 = array(,1)
ubound(obj1) => 0
ubound(obj2) =>1
So I wonder if there could be a way to use empty elements in array without a problem as if they are like integers or strings.
Thanks in advance.
[Solved]Counting elements of an Empty Array in OOO Basic
-
- Posts: 103
- Joined: Mon Sep 15, 2014 7:34 pm
[Solved]Counting elements of an Empty Array in OOO Basic
Last edited by sokolowitzky on Mon Aug 08, 2022 6:35 am, edited 1 time in total.
Win10-OpenOffice 4.1/LibreOffice 7.4
Re: Counting elements of an Empty Array in OOO Basic
obj1 = array(1,)
there is no second element. Put obj1 = array(1,EMPTY) if you want an empty one.
obj2 = array(,1)
vartype of the first value is error (10)
there is no second element. Put obj1 = array(1,EMPTY) if you want an empty one.
obj2 = array(,1)
vartype of the first value is error (10)
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)