Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3904

Get an empty array

$
0
0

How could I get an empty array?
The array()-function doesn’t work without without any parameter.
ReDim does only work on array that is not Nil.

Here is some Code:

Dim tmpObjectNames() As String = RaiseEvent getObjects
If tmpObjectNames = Nil Then tmpObjectNames = array()

If the Event “getObjects” is not implemented, tmpObjectNames is Nil. In this case it should be set to an empty array. So do I really have to do something like:

If tmpObjectNames = Nil Then 
Dim bla() as String
tmpObjectNames = bla
EndIf

31 posts - 8 participants

Read full topic


Viewing all articles
Browse latest Browse all 3904

Trending Articles