http://d.puremagic.com/issues/show_bug.cgi?id=5140
Rob T <al...@ucora.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |al...@ucora.com --- Comment #3 from Rob T <al...@ucora.com> 2012-09-27 00:06:22 PDT --- I'd like to add that __FUNCTION__ should operate in a consistent manner to __LINE__ and __FILE__ such that when used as a default value for a function parameter, the value is set where the function is called, not where the function is defined. void Log( string funcname = __FUNCTION__) { writeln( funcname ); } void func1() { Log(); // displays "func1" } void main() { Log(); // displays "main" } To be more useful, the nested function names will have to prefixed with parent level function names, and probably also module name as the highest level. void main() { void func2() { Log(); // displays "main.func2" } } Member functions of class and struc should be prefixed with the class and struc names respectively. For templates and overloaded functions, including the function signature would help resolve which version of a function was called. It may be best to have a separate version of __FUNCTION__ that displays the function signature, for example, C++ has __PRETTY_FUNCTION__ which includes the function signature. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------