 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Erik Max Francis Guest
|
Posted: Wed Jul 30, 2003 8:39 am Post subject: Re: [C++] About coding style |
|
|
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
|
Posted: Thu Jul 31, 2003 11:04 am Post subject: Re: [C++] About coding style |
|
|
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 .
--
----- 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 |
|
 |
|
|
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
|
|