<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to File macro</title><link>https://sourceforge.net/p/typp/wiki/File%2520macro/</link><description>Recent changes to File macro</description><atom:link href="https://sourceforge.net/p/typp/wiki/File%20macro/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 07 Jan 2016 10:59:59 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/typp/wiki/File%20macro/feed" rel="self" type="application/rss+xml"/><item><title>File macro modified by Cyder</title><link>https://sourceforge.net/p/typp/wiki/File%2520macro/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -10,8 +10,8 @@
 // Print the current source file
 printf("File = %s\n",__FILE__);

-#undef __LINE__ // Can't undef __LINE__
-#ifdef __LINE__
+#undef __FILE__ // Can't undef __FILE__
+#ifdef __FILE__
 // This block will still be enabled
 #endif

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cyder</dc:creator><pubDate>Thu, 07 Jan 2016 10:59:59 -0000</pubDate><guid>https://sourceforge.netde183d36e6fd61e9c70e887d8e608b9b52e93dde</guid></item><item><title>File macro modified by Cyder</title><link>https://sourceforge.net/p/typp/wiki/File%2520macro/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;strong&gt;File macro&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The c11 standard describes a macro called &lt;code&gt;__FILE__&lt;/code&gt;, that always expands to a string constant for the file name.&lt;br/&gt;
It is a predefined macro, that cannot be undefined or redefined.&lt;/p&gt;
&lt;p&gt;Hint: &lt;code&gt;__FILE__&lt;/code&gt; is returned as a normal string token, thus allowing it to be used for string concantation.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="c1"&gt;// Print the current source file&lt;/span&gt;
&lt;span class="n"&gt;printf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"File = %s&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="n"&gt;__FILE__&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="cp"&gt;#undef __LINE__ &lt;/span&gt;&lt;span class="c1"&gt;// Can't undef __LINE__&lt;/span&gt;
&lt;span class="cp"&gt;#ifdef __LINE__&lt;/span&gt;
&lt;span class="c1"&gt;// This block will still be enabled&lt;/span&gt;
&lt;span class="cp"&gt;#endif&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;s.a. &lt;span&gt;[Conditional directives]&lt;/span&gt;&lt;br/&gt;
s.a. &lt;span&gt;[Macros]&lt;/span&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cyder</dc:creator><pubDate>Thu, 07 Jan 2016 10:59:09 -0000</pubDate><guid>https://sourceforge.net99bb80db772b55e0a674737d1eff513bd28ebae4</guid></item></channel></rss>