C Socket programming question

S

Sidney Cadot

CBFalconer said:
You need to cut your problem down to a complete, compilable
program of about 100 lines or less, which does not use
non-standard constructs or functions (see the C standard), and
post that when asking for help. Do not use // comments (in the
newsgroup) nor exceed about 65 char. lines. Use spaces, not tabs,
for indentation.

What's so bad about using // comments (apart from the fact that they are
butt-ugly) ?

regards,

Sidney
 
A

Alex

Sidney Cadot said:
CBFalconer wrote:
What's so bad about using // comments (apart from the fact that they are
butt-ugly) ?

If they are wrapped by a news reader, they result in syntax errors,
while the /* ... */ comments do not.

Alex
 
K

Kelsey Bjarnason

What's so bad about using // comments (apart from the fact that they are
butt-ugly) ?

What's bad about them is that most folks still don't have C99 compilers,
and C89 didn't support // comments - so for the majority of people,
compiling C code, their compilers will only support // comments in
"non-conforming" mode - if at all. Anyone running the compiler in
conforming mode will be unable to compile the code without fixing the
comments... which is really annoying, since it's so totally trivial to
have gotten this right in the first place.
 
S

Sidney Cadot

Alex said:
If they are wrapped by a news reader, they result in syntax errors,
while the /* ... */ comments do not.

Brilliant! Didn't think of that, good rationale.

Best regards, Sidney
 
S

Sidney Cadot

What's bad about them is that most folks still don't have C99 compilers,
and C89 didn't support // comments - so for the majority of people,
compiling C code, their compilers will only support // comments in
"non-conforming" mode - if at all.

Ok. Following this argument, using any of new C99 features in code
fragments (when not relevant to the discussion) would be frowned upon.
I can see the practicality in this for the time being.

However, I've seen the argument made by some that since c.l.c. is about
the C language, and C is nowadays defined by the C99 standard, this
newsgroup should focus on it - hence the question.

Regards,

Sidney
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,104
Messages
2,570,643
Members
47,247
Latest member
youngcoin

Latest Threads

Top