On Dec 07, 2006, at 2:14 PM, JC wrote:
I had some code that tested to see if an array was empty and (as
far as I
can tell) worked fine.
u=UBound(xArray)
if u>-1 then
for i=0 to u
xPop.AddRow xArray(i)
next
end
Well xArray is being passed to this method and if it's "nil" this
doesn't
work. Anyway it appears that I can't test for nil because the
array isn't
an object. So these doesn't work:
if xArray is nil then
if xArray = nil then
Etc etc...
What am I missing here? Something obvious I'm sure...
Nothing
Arrays are "special" in this way as they are not objects that you can
test for nil
If you do
function makeNilArray() as String()
// note there is DELIBERATELY no return value
end function
you get a nil array and then you're in trouble and you cannot compile
anything that tries to do "if array is nil"
Don't do that
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>