callstack level

S

seannakasone

how do we obtain the callstack level? for you tcl programmers, i'm
looking for something equivalent to [info level].
 
R

Robert Klemme

how do we obtain the callstack level? for you tcl programmers, i'm
looking for something equivalent to [info level].

Does this help?

09:12:26 [~]: ruby -e 'def f() p caller end; p caller; f'
[]
["-e:1"]

Kind regards

robert
 
S

seannakasone

Robert said:
how do we obtain the callstack level? for you tcl programmers, i'm
looking for something equivalent to [info level].

Does this help?

09:12:26 [~]: ruby -e 'def f() p caller end; p caller; f'
[]
["-e:1"]

Kind regards

robert

Yes, that helps, thanks. finding the caller was the main reason for
obtaining the callstack level. although knowing how deep the callstack
would also be nice but if i only can find caller, i'm happy.
 
R

Robert Klemme

Robert said:
how do we obtain the callstack level? for you tcl programmers, i'm
looking for something equivalent to [info level].
Does this help?

09:12:26 [~]: ruby -e 'def f() p caller end; p caller; f'
[]
["-e:1"]

Kind regards

robert

Yes, that helps, thanks. finding the caller was the main reason for
obtaining the callstack level. although knowing how deep the callstack
would also be nice but if i only can find caller, i'm happy.

caller returns the complete stack.

robert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top