CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

rs232 missed characters
Goto page Previous  1, 2
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Wed Dec 06, 2006 3:57 pm     Reply with quote

BOB_SANTANA wrote:
yes i suppose
i am typing in on hyperterm and i also created text files with some different combination and send it to my pic as text file via hypertem
Now just to ask and please don't take it the wrong way i just want your professional opinion
When using the curly brackets with C which way is better

Code:


 Type A                                          Type B

 if (condition) {                            if (condition)
          do this;                                 {
        }                                             do this; 

                                                    } 


In my opinion its best to be consistent and put as much information on the screen as possible. I use a hybrid approach. I put the opening and closing brackets in the same column and all the code they contain shifted over to the next tab break. I normally use tab breaks of 3 characters as that is enough to be distinctive and not push code off the right side of the screen more than necessary.
Code:

if (condition1)
{  do this;
   and this;
   and this;
   if (condition2)
   {  do this;
      and this;
      and this;
   }
}
BOB_SANTANA



Joined: 16 Oct 2006
Posts: 110
Location: HOVE, EAST SUSSEX

View user's profile Send private message

PostPosted: Wed Dec 06, 2006 4:59 pm     Reply with quote

Davekelly

Thank you very much for the link
i proved very useful

Regards
_________________
BOB_Santana Smile
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group