C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: [C++] About coding style

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
Erik Max Francis
Guest





PostPosted: Wed Jul 30, 2003 8:39 am    Post subject: Re: [C++] About coding style Reply with quote



Steven wrote:

Quote:
The question acturally is: is "" necessary? If it is not, why may C
sources use it?

In general code, no, it is not necessary at all. It is only required
when defining C macros, which is probably where you remember seeing it.

--
Erik Max Francis && [email]max (AT) alcyone (DOT) com[/email] && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ It is human nature to think wisely and act foolishly.
__/ Anatole France

Back to top
stephan beal
Guest





PostPosted: Thu Jul 31, 2003 11:04 am    Post subject: Re: [C++] About coding style Reply with quote



Steven wrote:
Quote:
It is expected that each line of program is not beyond 80 columns.

"Expected" by who? If you're used to running on a terminal which is 100+
columns wide then 80 seems rather archaic, in the same way that 25
lines/screen seems archaic. The point being, 80 cols/line is a historical
convention, not necessarily an "expectation."


Quote:
The question acturally is: is "" necessary? If it is not, why may C
sources use it?

They often use it macros, where it is needed, but it is not needed in other
contexts and may cause an error, depending on your compiler. Once, for
example, i had to edit my local mod_jk sources because they used this and
my compiler wouldn't accept it.

Quote:
Question2:
Many function defination is longer than 80 columns, so I need to split
them this way:

You don't /need/ to split them at all. You /feel compelled/ to split them.

Quote:
The question is that how can I deal with it? Would anyone give me some
suggestions?

Stop limiting yourself to historical conventions and code however feels
right for you Smile.

--
----- stephan beal
Registered Linux User #71917 http://counter.li.org
I speak for myself, not my employer. Contents may
be hot. Slippery when wet. Reading disclaimers makes
you go blind. Writing them is worse. You have been Warned.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
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, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.