callstack level

Discussion in 'Ruby' started by seannakasone@yahoo.com, Jul 5, 2006.

  1. Guest

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

  2. wrote:
    > 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
     
    Robert Klemme, Jul 5, 2006
    #2
    1. Advertising

  3. Guest

    Robert Klemme wrote:
    > wrote:
    > > 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.
     
    , Jul 6, 2006
    #3
  4. wrote:
    > Robert Klemme wrote:
    >> wrote:
    >>> 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
     
    Robert Klemme, Jul 6, 2006
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Morten Simonsen

    Retrieve callstack from a Thread

    Morten Simonsen, Sep 17, 2003, in forum: Java
    Replies:
    1
    Views:
    324
    Robert Olofsson
    Sep 17, 2003
  2. Jacob

    Callstack question

    Jacob, Sep 22, 2003, in forum: Java
    Replies:
    0
    Views:
    349
    Jacob
    Sep 22, 2003
  3. pabbu
    Replies:
    8
    Views:
    743
    Marc Boyer
    Nov 7, 2005
  4. Replies:
    11
    Views:
    542
    Ian Collins
    Apr 26, 2006
  5. Replies:
    1
    Views:
    200
Loading...

Share This Page