How about adding NEW Special Tokens?? For ease and Security
KennyTM~
kennytm at gmail.com
Wed May 25 06:49:17 PDT 2011
On May 25, 11 21:45, Daniel Gibson wrote:
>>> 5) __DEBUGLINE__ // prints __MODULE__ ~ __BLOCKNAME__ ~ __FUNCNAME__ ~
>>> >> __LINE__
>> >
>> > Just define that function if you need it.
>> >
>> > string __DEBUGLINE__() {
>> > return __MODULE__ ~ ":" ~ ...;
>> > }
>> >
> are you sure this works? this probably returns the module etc where
> __DEBUGLINE__ resides and not the module etc from where it's called.
>
You're right. It won't work in this form, but it will work if they're
present as default parameters.
string __DEBUGLINE__(string fn=__FILE__, string ln=__LINE__, etc) {
return fn ~ ":" ~ to!string(ln);
}
More information about the Digitalmars-d
mailing list