<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[qwe98734-programming - Medium]]></title>
        <description><![CDATA[My programming experience reviews - Medium]]></description>
        <link>https://medium.com/qwe98734-programming?source=rss----1d9fa51f65de---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>qwe98734-programming - Medium</title>
            <link>https://medium.com/qwe98734-programming?source=rss----1d9fa51f65de---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:54:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/qwe98734-programming" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Preprocessor in C (#define)]]></title>
            <link>https://medium.com/qwe98734-programming/preprocessor-in-c-define-42431282010e?source=rss----1d9fa51f65de---4</link>
            <guid isPermaLink="false">https://medium.com/p/42431282010e</guid>
            <category><![CDATA[c]]></category>
            <dc:creator><![CDATA[Michael Wang]]></dc:creator>
            <pubDate>Wed, 15 Nov 2017 07:00:13 GMT</pubDate>
            <atom:updated>2017-11-15T07:00:13.017Z</atom:updated>
            <content:encoded><![CDATA[<p>The statement of using #define directive is called as a macro.</p><p>The statement would be like the following:</p><blockquote><em>#define</em> identifier replacement-list</blockquote><p>There are several directives in C, and each function can be found online:</p><ol><li>#define</li><li>#undef</li><li>#ifdef</li><li>#ifndef</li><li>#if</li><li>#elif</li><li>#else</li><li>#endif</li><li>#error</li><li>#line</li><li>#pragma</li></ol><p>These directives are executed in the preprocess step which precede compile stage.</p><p>Here is an example:</p><blockquote>#define NUM 100</blockquote><blockquote>void main () { int x = NUM; }</blockquote><p>After preprocessing, the code will be outputted like this:</p><blockquote>void main() { int x = 100; }</blockquote><p>You can see that the NUM macro was replaced, and the directive statement would be removed. After preprocessing, the transformed code will be compiled as usual.</p><h3><strong>The # Operator</strong></h3><p>This operator is used to treat a token as a string literal.</p><p>For example:</p><blockquote>#define PRINT(n) printf(#n “ = %d\n”, n)</blockquote><blockquote>PRINT(i+j);</blockquote><p>After preprocessing, it will be:</p><blockquote>printf(“i+j” ” = %d\n”, i+j);</blockquote><p>Note: “x” “ + y” will be combined to “x + y” after compiling.</p><p>So, the statement is equivalent to</p><blockquote>printf(“i+j = %d\n”, i+j);</blockquote><h3>The ## Operator</h3><p>This operator is used to concatenate each token.</p><p>For example:</p><blockquote>#define CONCAT(n) a##n</blockquote><blockquote>int CONCAT(1), CONCAT(2), CONCAT(3);</blockquote><p>After preprocessing, it will be:</p><blockquote>int a1, a2, a3;</blockquote><p>There are a lot of small but influential details and approaches should be concerned when using these directives. Read the instructions online or from books before using them in a complex or advanced way, or the result can be unpredictable since the code is transformed and is not looked like what you see.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42431282010e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qwe98734-programming/preprocessor-in-c-define-42431282010e">Preprocessor in C (#define)</a> was originally published in <a href="https://medium.com/qwe98734-programming">qwe98734-programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Common Commands in Vim]]></title>
            <link>https://medium.com/qwe98734-programming/common-commands-in-vim-29f0a90f2259?source=rss----1d9fa51f65de---4</link>
            <guid isPermaLink="false">https://medium.com/p/29f0a90f2259</guid>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Michael Wang]]></dc:creator>
            <pubDate>Sun, 05 Nov 2017 07:05:33 GMT</pubDate>
            <atom:updated>2017-11-05T14:16:05.838Z</atom:updated>
            <content:encoded><![CDATA[<h3>Move Cursor</h3><p><strong>0</strong>(Number) or [<strong>Home</strong>] : move to the head of the current line(frequent)</p><p><strong>$ or </strong>[<strong>End</strong>] : move to the end of the current line(frequent)</p><p><strong>H </strong>: move to the head character of the first line of the current screen</p><p>— — remember: H =&gt; High</p><p><strong>M </strong>: move to the head character of the middle line of the current screen</p><p>— — remember: M =&gt; Middle</p><p><strong>L </strong>: move to the head character of the last line of the current screen</p><p>— — remember: L =&gt; Low</p><p><strong>G </strong>: move to the last line of the current file(frequent)</p><p>— — remember: G =&gt; Ground</p><p><strong>gg </strong>: move to the first line of the current file, which is equal to the command “1G”.(frequent)</p><p>— — remember: gg =&gt; good game!! from the top!!</p><p><strong>nG </strong>: n is a number, move to the nth line</p><p>— — remember: nG =&gt; the nth ground</p><h3>Scroll Screen</h3><p>[<strong>Ctrl</strong>] + [<strong>f</strong>] : scroll down a page, which is equal to [Page down] button (frequent)</p><p>— —remember : f =&gt; forward</p><p>[<strong>Ctrl</strong>] + [<strong>b</strong>] : scroll up a page, which is equal to [Page Up] button(frequent)</p><p>— — remember: b =&gt; backward</p><p>[<strong>Ctrl</strong>] + [<strong>d</strong>] : scroll down half a page</p><p>— — remember: d =&gt; down</p><p>[<strong>Ctrl</strong>] + [<strong>u</strong>] : scroll up half a page</p><p>— — remember: u =&gt; up</p><h3>Edit Content</h3><p><strong>u </strong>: undo the last action(frequent)</p><p>— — remember: u =&gt; undo</p><p>[<strong>Ctrl</strong>]+<strong>r </strong>: redo the last action(frequent)</p><p>— — remember: r =&gt; redo</p><p>Reference from :</p><p><a href="http://linux.vbird.org/linux_basic/0310vi.php">第九章、vim 程式編輯器</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=29f0a90f2259" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qwe98734-programming/common-commands-in-vim-29f0a90f2259">Common Commands in Vim</a> was originally published in <a href="https://medium.com/qwe98734-programming">qwe98734-programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Switch vs. If-Else-If]]></title>
            <link>https://medium.com/qwe98734-programming/switch-vs-if-else-if-136fb25cfadb?source=rss----1d9fa51f65de---4</link>
            <guid isPermaLink="false">https://medium.com/p/136fb25cfadb</guid>
            <category><![CDATA[c]]></category>
            <dc:creator><![CDATA[Michael Wang]]></dc:creator>
            <pubDate>Fri, 03 Nov 2017 08:54:18 GMT</pubDate>
            <atom:updated>2017-11-14T03:57:49.161Z</atom:updated>
            <content:encoded><![CDATA[<p>A note on rereading the C Programming Textbook</p><p><strong>If-Else-If</strong> : Necessary to orderly compare each if statement</p><p><strong>Switch</strong> : After the first calculation, compiler utilizes <a href="https://en.wikipedia.org/wiki/Branch_table">branch table</a> to jump to the specified case, case is “label” in assembly</p><blockquote>Brief conclusion :</blockquote><blockquote>With limited support of Integer and Char in C, “Switch” is faster than “If-Else-If”.</blockquote><blockquote>Although String is also supported after the release of Java Platform SE 7, the most important point of which to apply depends on the readability and maintainability.</blockquote><p>Reference :</p><p><a href="https://stackoverflow.com/questions/2158759/case-vs-if-else-if-which-is-more-efficient">Stack Overflow Question</a></p><p><a href="http://www.blackwasp.co.uk/SpeedTestIfElseSwitch.aspx">Time Consumption Comparison</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=136fb25cfadb" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qwe98734-programming/switch-vs-if-else-if-136fb25cfadb">Switch vs. If-Else-If</a> was originally published in <a href="https://medium.com/qwe98734-programming">qwe98734-programming</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>