From help-octave-request at bevo dot che dot wisc dot edu Sat Dec 29 20:14:13 2001 Subject: Is there a built-in variable that contains a function's name? From: Roberto Hernandez To: help-octave at bevo dot che dot wisc dot edu Date: Sat, 29 Dec 2001 23:13:12 -0300 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 -------------------------------------------------------------