Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Recursive Function Loop-de-loop

by mfriedman (Monk)
on Aug 13, 2002 at 18:50 UTC ( #189918=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://189918]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2021-06-13 18:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (57 votes). Check out past polls.

    Notices?