__FUNCTION__

Derek Parnell derek at psych.ward
Sat Feb 28 14:35:57 PST 2009


On Sat, 28 Feb 2009 17:27:27 -0500, Jarrett Billingsley wrote:

> On Sat, Feb 28, 2009 at 5:24 PM, Derek Parnell <derek at psych.ward> wrote:
>> void foo()
>> {
>>    writefln(__FUNCTION__);
>> }
>>
>> void foo(int x)
>> {
>>    writefln(__FUNCTION__);
>> }

 
> I mentioned in a follow-up post that it would probably have to give a
> fully-qualified name in the presence of multiple modules and nesting
> and such. 

Ah yes, I read that now ... {note to self: Should read all posts before
replying :-)}

> As for multiple overloads - so what?  All I want is the
> name of the function.

But why? There could be conceivable circumstances in which one needed to
know *which* 'foo' issued the message, one might need finer or more details
to know that.

-- 
Derek Parnell
Melbourne, Australia
skype: derek.j.parnell



More information about the Digitalmars-d mailing list