in reply to Recursive Function Loop-de-loop
I'm not entirely sure what you're asking since you didn't paste any code, but my guess is you will want to impliment some sort of stack counter. The counter will be incremented every time a function is entered and decremented ust before it returns. The stack counter can be a global (ick) or passed between the functions. Then when appending to your string you will look at the stack counter to know how many spaces to indent.