[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Is there a built-in variable that contains a function's name?
From: |
Roberto Hernandez |
Subject: |
Is there a built-in variable that contains a function's name? |
Date: |
Sat, 29 Dec 2001 23:13:12 -0300 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011221 |
Hello everyone,
Is there any built in variable (such as nargin) that contains the name
of the function that is being executed? I've been searching the
documentation, but if it's there I haven't found it.
What I'm trying to do is to include something like this at the beginning
of each function:
--------------------
function foo()
printf("%s\n", variable_containing_function_name);
fflush(stdout);
...
endfunction
--------------------
That way I can locate bugs a lot easier. I would rather use a variable
than hard code the name in the printf statement if that's possible, just
in case I later change the function name and forget to change the rest.
TIA and Happy New Year.
- Roberto
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- Is there a built-in variable that contains a function's name?,
Roberto Hernandez <=