help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Identifying the name of a parent function in a child function?


From: Thomas Treichl
Subject: Identifying the name of a parent function in a child function?
Date: Thu, 24 Apr 2008 21:27:12 +0200
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)

Hi,

I'm currently playing with some algorithms and what I could need now that would be a way to find out which, let's say, 'parent function' called my 'child function'. Is there a way to do that by not passing an ID-variable from the parent to the child (eg. like dbstack works in Matlab) and by not setting a global or persistent variable before?

What I mean by example

  function [] = funA ()
    funC;
  endfunction

  function [] = funB ()
    funC;
  endfunction

  function [] = funC ()
    # Did funA or funB call me?
  endfunction

Thanks,

  Thomas


reply via email to

[Prev in Thread] Current Thread [Next in Thread]