Hi all,
How can I know if a dynamic array contains something?
I'm using it as follows:
since it's conditioned, so I can't know if something is added (preserved) to the array.
at the end of this flow, I would like to check it (see comment inside the code). I tried ubound, lbound, isarray and isempty function, and none of them returns what I need.
Currently I'm using a boolean variable that indicates it to me, but I would like to know if there is some better way to find it.
Thanks in advance!
How can I know if a dynamic array contains something?
I'm using it as follows:
Code:
dim strings() as string
dim i as integer
for i = ....
if something...
ReDim Preserve strings(i) As String
end if
next i
' Here I want to know if strings() contains something
since it's conditioned, so I can't know if something is added (preserved) to the array.
at the end of this flow, I would like to check it (see comment inside the code). I tried ubound, lbound, isarray and isempty function, and none of them returns what I need.
Currently I'm using a boolean variable that indicates it to me, but I would like to know if there is some better way to find it.
Thanks in advance!