<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Breaking instructions into two lines</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/42916/breaking-instructions-into-two-lines</link><description> 
Hi everyone, 

 
How can I break a long instruction line into two or three lines to
improve readability of the program written in &amp;quot; C language 
? 

 
Best regards, 
Deepak 
 </description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/144151?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2006 06:50:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:24d2c981-a417-4995-be1f-f233097b0873</guid><dc:creator>alan raj</dc:creator><description>&lt;p&gt;&lt;p&gt;
Y a you guessed it right, eric,&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/141662?ContentTypeID=1</link><pubDate>Tue, 31 Oct 2006 06:45:10 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5bc99e11-429d-4543-a810-d8d4a5ffe674</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
is that another &amp;#39;ghost&amp;#39;? It does not sound like Dan&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/138283?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2006 22:45:19 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cbe9c2eb-4a2e-4211-922a-b679fb401e70</guid><dc:creator>alan raj</dc:creator><description>&lt;p&gt;&lt;p&gt;
&amp;quot;if you heard what I thought I said, we would communicate well&amp;quot;
:)&lt;/p&gt;

&lt;p&gt;
when asked,&lt;br /&gt;
a simple redirection to other chips,&lt;/p&gt;

&lt;p&gt;
say on,&lt;br /&gt;
what goes ahead,&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/138280?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2006 04:39:28 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:e5552a63-54b9-464c-817f-8f19f807750f</guid><dc:creator>alan raj</dc:creator><description>&lt;p&gt;&lt;p&gt;
getting accustomed to &lt;b&gt;your&lt;/b&gt; frequency,&lt;/p&gt;

&lt;p&gt;
say on&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/150582?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2006 09:25:55 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:c6a90de5-57d0-47b8-adbd-2c51242dea4a</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;a href="http://www.isle-of-man.com/manxnotebook/tourism/albums.htm"&gt;www.isle-of-man.com/.../albums.htm&lt;/a&gt;
?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/150177?ContentTypeID=1</link><pubDate>Fri, 13 Oct 2006 08:22:41 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:399e2df6-8522-41d4-9a30-7776327d6488</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;Everyone knows that Proper Listings have to be done on
132-Column fanfold paper&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
just for your amusement&lt;/p&gt;

&lt;p&gt;
The Danish name for fanfold paper is &amp;quot;Leporello paper&amp;quot; I know why,
anyone else?&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/149723?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 17:30:38 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:b0a2849c-069f-420c-bfba-00bfb86e9893</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;we take print outs of the whole code for documentation in A4
paper&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
What??&lt;/p&gt;

&lt;p&gt;
Everyone knows that &lt;b&gt;Proper&lt;/b&gt; Listings have to be done on
132-Column fanfold paper... ;-)&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/149720?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 12:08:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:39bb05a1-45c0-48b1-a3b0-cd2e573e02c6</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
have not heard of that for ages&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/149212?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 11:23:35 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:524a0ccf-c9df-4835-aba8-075c8826b9f9</guid><dc:creator>Deepak P</dc:creator><description>&lt;p&gt;&lt;p&gt;
No sir, when we take print outs of the whole code for
documentation in A4 paper it looks nice if it is a 80 column.&lt;br /&gt;
thats all&lt;br /&gt;
best regards,&lt;br /&gt;
Deepak.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/148799?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 10:14:09 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:40ddee78-11f8-4c5a-b838-4fcdce753ab5</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;We have a 80 column limit here!&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Why?&lt;/p&gt;

&lt;p&gt;
Are you still coding on 80x24 terminals?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/134832?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 09:41:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:09ec98a4-efa9-40e2-a064-160af061136c</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
absolutely &amp;#39;reasonable&amp;#39; to split lines, that intention of my post
was not to argue that point. However the most frequent reason for
line splittiing is the &lt;b&gt;so called&lt;/b&gt; &amp;quot;real C programmers&amp;quot; LOVE of
cramming as much into one statement as possible, and THAT was what I
really stated about.&lt;/p&gt;

&lt;p&gt;
&amp;quot;if you heard what I thought I said, we would communicate well&amp;quot;
:)&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/123448?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 09:26:54 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:dbbd6553-1989-40ae-8da4-053ff8cdcaba</guid><dc:creator>Deepak P</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi Everyone,&lt;/p&gt;

&lt;p&gt;
Thank you very much for the help provided and for the faq link. My
issue was only the readability problem. We have a 80 column limit
here! That was sorted by Mr. Andy Neil&amp;#39;s first mail. Thank you all so
much for helping me.&lt;/p&gt;

&lt;p&gt;
Multi Line macro was a new information for me. I never used
macros!!&lt;/p&gt;

&lt;p&gt;
Thanks for the &lt;b&gt;for(... a, b, ...)&lt;/b&gt; example by Mr. Erik.&lt;/p&gt;

&lt;p&gt;
Best regards,&lt;br /&gt;
Deepak&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/112365?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 08:25:16 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:ede9a67f-43e6-49dc-9696-c89d2d5cca85</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;quot;if you need to break a C statement into many lines, I would
hate to read your C.&amp;quot;&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
Not necessarily.&lt;/p&gt;

&lt;p&gt;
For example, an &lt;b&gt;if&lt;/b&gt; statement is a single statement
(possibly including an &lt;b&gt;else&lt;/b&gt; clause) - but it is very common
indeed to split it over many lines!&lt;/p&gt;

&lt;p&gt;
Another example: a function call is a single statement:&lt;/p&gt;

&lt;pre&gt;
func( a, b, c );
&lt;/pre&gt;

&lt;p&gt;
but it can be quite helpful to split it over several lines:&lt;/p&gt;

&lt;pre&gt;
   func
   (
       a, // document the 1st parameter
       b, /* document the 2nd parameter */
       c  // document the 3rd parameter
   );
&lt;/pre&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/98507?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 07:59:52 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:cec1c236-5b38-45c0-8b7b-4bc74a027eac</guid><dc:creator>erik  malund</dc:creator><description>&lt;p&gt;&lt;p&gt;
if you need to break a C statement into many lines, I would hate
to read your C.&lt;/p&gt;

&lt;p&gt;
I know that &amp;quot;real C&amp;quot; is the attempt to write the entire program in
one statement, but IMHO it STINKS.&lt;/p&gt;

&lt;p&gt;
for example&lt;/p&gt;

&lt;p&gt;
for ( .. ; a,b,c,d ; ...)&lt;br /&gt;
is difficult to read and almost impossible to comment in a sesible
fashion&lt;/p&gt;

&lt;p&gt;
can be so much more readable (and compiles more compact) if
written&lt;br /&gt;
for ( ... ; a ; ....)&lt;br /&gt;
{ ...&lt;br /&gt;
if (b) break; // comment&lt;br /&gt;
...&lt;br /&gt;
if (c) break; // comment&lt;br /&gt;
...&lt;br /&gt;
if (d) break; // comment&lt;br /&gt;
...&lt;br /&gt;
}&lt;/p&gt;

&lt;p&gt;
Erik&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/87967?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 05:58:06 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:92c9b4be-cf88-4df5-9ada-1586b69fe779</guid><dc:creator>Christoph Franck</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;i&gt;&amp;#39;C&amp;#39; treats all whitespace sequences (including comments) as
equivalent - so, anywhere that one space is permitted, you can put as
many spaces, tabs, newlines and comments as you like!&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;
*nitpick*&lt;/p&gt;

&lt;p&gt;
The C compiler does treat all whitespace sequences as equivalent.
The preprocessor, however, doesn&amp;#39;t.&lt;/p&gt;

&lt;p&gt;
Multiline macros, for example, need the &amp;#39;\&amp;#39; character to signal
the continuation after the line break.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/87969?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 05:02:03 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:82ce6f27-a4a0-4e66-8bc4-1c63ce1d8c90</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
Space, Horizontal Tab, Newline, Vertical Tab, Form-Feed.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/87979?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 04:58:21 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8ee58544-828f-4cb8-8f9a-fddf8ec2bb66</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
&lt;a href="http://c-faq.com/style/index.html"&gt;c-faq.com/.../index.html&lt;/a&gt;&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Breaking instructions into two lines</title><link>https://community.arm.com/thread/46996?ContentTypeID=1</link><pubDate>Thu, 12 Oct 2006 04:47:22 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:8bad25c2-56cc-4507-b638-75b5999a7eeb</guid><dc:creator>Andy Neil</dc:creator><description>&lt;p&gt;&lt;p&gt;
This is a standard &amp;#39;C&amp;#39; question - nothing specifically to do with
Keil nor the 8051!&lt;/p&gt;

&lt;p&gt;
&amp;#39;C&amp;#39; treats all whitespace sequences (including comments) as
equivalent - so, anywhere that one space is permitted, you can put as
many spaces, tabs, newlines and comments as you like!&lt;/p&gt;

&lt;p&gt;
Basically, whitespace can come anywhere &lt;i&gt;between&lt;/i&gt; tokens;&lt;/p&gt;

&lt;p&gt;
See your &amp;#39;C&amp;#39; textbook.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>