[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



> Aha - I supposed I would be entering explicit text to replace
> __FILE__::__LINE__ - Are these predefined symbols that [say] cpp fills in
> during compilation? That's very nice to know.

__LINE__ is a builtin macro that expands to a decimal constant.
__FILE__ is another that expands into a string.  

There are also goodies like __DATE__ and __TIME__.  Google Predefined 
Preprocessors Macros for a list.

I'm pretty sure MSVC++ has both __CLASS__ and __FUNCTION__.  All the gnu 
compilers have __FUNCTION__ and __PRETTY-FUNCTION__ (which gives class info).

And yes, I found out most of this after I had larded up thirty files with

#undef CLASSNAME
#define CLASSNAME ("YetAnotherClass")
#undef FUNCNAME
#define FUNCNAME ("YetOneMoreFunction")

Getting to remove all of those was a red-letter day.

Barry



>
>  - John Mills
>    john.m.mills at alum.mit.edu
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
&gt; <a  rel="nofollow" href="http://www.ale.org/mailman/listinfo/ale";>http://www.ale.org/mailman/listinfo/ale</a>


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00874" href="msg00874.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
<ul><li><em>From:</em> johnmills at speakeasy.net (John Mills)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00855" href="msg00855.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
<ul><li><em>From:</em> johnmills at speakeasy.net (John Mills)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00855.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00857.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00855.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00874.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00856"><strong>Date</strong></a></li>
<li><a href="threads.html#00856"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>