justa quick note. When calling recursive functions you end up with whatever is loaded in memory each time the function is called before calling itself. So large object/type declarations etc. should be called after the recursive function call if possible. This will speed up your processing as well as shrink memory usage of the recursive function.
ie
BAD WAY
function FINDSTUFF(Value1)
dim HUGEARRAY(10022)
if x=y then
FINDSTUFF(x)
else
dootherstuff with HUGEARRAY
end if
end function
-----------------------
GOODWAY
----------------------
function FINDSTUFF(Value1)
if x=y then
FINDSTUFF(x)
else
dim HUGEARRAY(10022)
dootherstuff with HUGEARRAY
end if
end function
------------------
Its a simple thing to check after you get the function working. If you dont do it it may cost you heavy fPS for not streamlining.
ie
BAD WAY
function FINDSTUFF(Value1)
dim HUGEARRAY(10022)
if x=y then
FINDSTUFF(x)
else
dootherstuff with HUGEARRAY
end if
end function
-----------------------
GOODWAY
----------------------
function FINDSTUFF(Value1)
if x=y then
FINDSTUFF(x)
else
dim HUGEARRAY(10022)
dootherstuff with HUGEARRAY
end if
end function
------------------
Its a simple thing to check after you get the function working. If you dont do it it may cost you heavy fPS for not streamlining.