>>Actually, there is some optimization going on in that case. Unfortunately, it can cause the
>>code to break in recursive cases. To avoid the optimization _IF_ you are hitting this
>>problem, change it to read:
lcXML = "" + lcXML + someaddition
>Garrett, can you expand on this a bit more please? Why is this faster?
As I said above, this _isn't_ faster: it disables the optimization, and I expect that Fabio correctly explaned the mechanism. If you check out my code linked from
http://www.capescience.com/webservices/globalweather/index.shtml, you'll see that I used this technique in the middle of a recursive loop. Change
lcRetVal = "" + lcRetVal + ;
CHR(13) + CHR(10) + ;
tcTab + loChild.baseName + " -- " + ParseNode(loChild, tcTab + CHR(9))
to
lcRetVal = lcRetVal + ;
CHR(13) + CHR(10) + ;
tcTab + loChild.baseName + " -- " + ParseNode(loChild, tcTab + CHR(9))
and you will see that despite the LOCAL declaration of lcRetVal, it unrolls improperly as the recursion works its way back up the tree.