Eats, Shoots & Leaves

  • Thread starter E. Robert Tisdale
  • Start date
E

E. Robert Tisdale

Mike said:
A book about English punctuation
is not topical for comp.lang.c.


The punctuation of C programs is not governed
by the rules of English, but by ISO 9899.

You missed the point Mike. It wasn't about C syntax.
It was about coding style
which is *not* governed by ISO 9899.
 
M

Mike Wahler

E. Robert Tisdale said:
You missed the point Mike. It wasn't about C syntax.

It was about 'punctutation'.


Punctuation, as defined by the C language, is part of its
syntax. One of the types of tokens defined is 'punctuator'.
It was about coding style
which is *not* governed by ISO 9899.

The punctuation rules of the C grammar are not
a matter of style, they're part of the syntax rules.

-Mike
 
D

Dave Vandervies

You missed the point Mike. It wasn't about C syntax.
It was about coding style
which is *not* governed by ISO 9899.

In English, it is conventional to end most (not all, but most) statements
with a period ('.', which if I'm not mistaken is referred to in British
as a full stop). Please try doing this in your C programs and let us
know how it works.


dave
 
C

CBFalconer

Dave said:
In English, it is conventional to end most (not all, but most)
statements with a period ('.', which if I'm not mistaken is
referred to in British as a full stop). Please try doing this
in your C programs and let us know how it works.

+-------------------+ .:\:\:/:/:.
| PLEASE STARVE | :.:\:\:/:/:.:
| THE TROLLS | :=.' - - '.=:
| | '=(\ 9 9 /)='
| Thank you, | ( (_) )
| Management | /`-vvv-'\
+-------------------+ / \
| | @@@ / /|,,,,,|\ \
| | @@@ /_// /^\ \\_\
@x@@x@ | | |/ WW( ( ) )WW
\||||/ | | \| __\,,\ /,,/__
\||/ | | | jgs (______Y______)
/\/\/\/\/\/\/\/\//\/\\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
==============================================================
 
M

Malcolm

Dave Vandervies said:
In English, it is conventional to end most (not all, but most)
statements with a period ('.', which if I'm not mistaken is referred
to in British as a full stop). Please try doing this in your C
programs and let us know how it works.
Strictly a "period" is the sentence, not the punctuation that stops it, so
the Americans have got it wrong.

This would be quite a good exercise for the Obfuscated C competion - write a
program which is legal C as well as a grammatical and correctly-punctuated
English paragraph.
 
C

Curley Q.

Dave said:
In English, it is conventional to end most (not all, but most) statements
with a period ('.', which if I'm not mistaken is referred to in British
as a full stop).

Commas should delimit the dependant clause: 'if I'm not
mistaken.' You'd better read the book.
 
T

Tydr Schnubbis

If it's about punctuation in comments, why not? Comments are a part of
the C language.
 
A

Arthur J. O'Dwyer

Commas should delimit the dependant clause: 'if I'm not
mistaken.' You'd better read the book.

Commas generally indicate pauses in speech. If, as here, the sentence
would make no sense without the pauses, then the commas are required.
However (and here the comma is again required), there are situations
such as this one here which do not generally require paired commas.
Admittedly, inserting paired commas tends to make things easier to read,
especially in contrived sentences such as the ones above --- but the
points are that commas are not *always* required, and that random
English-usage discussions are *always* off-topic here. Follow-ups set.

FWIW, neither are panda jokes. Please don't feed the Trolls[dale].

-Arthur
 
E

E. Robert Tisdale

Arthur said:
Commas generally indicate pauses in speech.
If, as here, the sentence would make no sense without the pauses,
then the commas are required.

Nonsense!
Unless the sentence is meant to be read aloud, the pause makes no sense.
The purpose of the comma (in your example and mine)
is to set off a prepositional phrase that appears out of place.
If you had written, "The commas are required
if the sentence would make no sense without the pauses" or
if I had written, "The pause makes no sense
unless the sentence is meant to be read aloud"
the comma would not be required.
However (and here the comma is again required),

According to The American Heritage Dictionary of the English Language

http://www.bartleby.com/61/58/H0305800.html

USAGE NOTE: Although some grammarians have insisted that however should
not be used to begin a sentence, this rule has been ignored by a number
of reputable writers. Forty-two percent of Usage Panelists say they do
not follow the rule in their own writing, 19 percent say they observe it
only sometimes, and 36 percent say they usually observe it. See Usage
Notes at but, whatever.
there are situations such as this one here
which do not generally require paired commas.
Admittedly, inserting paired commas tends to make things easier to read,
especially in contrived sentences such as the ones above ---
but the points are that commas are not *always* required,

The comma before a conjunction (i.e. , and)
is redundant and superfluous.
and that random English-usage discussions are *always* off-topic here.

But no [white]space should ever appear before a comma
and at least one [white]space should appear after a comma.
s
 
D

Dik T. Winter

> The comma before a conjunction (i.e. , and)
> is redundant and superfluous.

Ah, the serial comma. It has been the topic of dicussion a few months
ago on sci.lang, and now here. It can be useful, but not always is so.
It appears to be required in American literature and it appears to not
be allowed in English literature, so take your pick. (And make a
comparison between the US and UK versions of Harry Potter books.) But
it is off-topic here.
 
E

E. Robert Tisdale

Dave said:
In English,
it is conventional to end most (not all, but most) statements
with a period ('.', which if I'm not mistaken
is referred to in British as a full stop).

You must be thinking of the Pascal computer programming language.
In C as in Pascal, statements are clauses
which are properly terminated by a semicolon.
A Pascal program is one long sentence properly terminated by a period.
 
R

Rob Thorpe

Dik T. Winter said:
Ah, the serial comma. It has been the topic of dicussion a few months
ago on sci.lang, and now here. It can be useful, but not always is so.
It appears to be required in American literature and it appears to not
be allowed in English literature, so take your pick. (And make a
comparison between the US and UK versions of Harry Potter books.) But
it is off-topic here.

The english call a comma before an and, an Oxford comma. They are
quite useful in lists to reduce ambiguity. It makes it clear if the
whole list is connected, or if the last two items are more intimately
connected. For example:

To my parents, Ayn Rand and God.

would be

To my parents, Ayn Rand, and God.

Which kills the humour a bit. It can also be useful if there are
several things in a list connected with and's themselves.

These items are available in black and white, red and yellow, and blue
and green.

Thankfully C doesn't have these grammatical intricacies. I seems to
specialise more in semantic intricacies.
 
R

Richard Bos

E. Robert Tisdale said:
According to The American Heritage Dictionary of the English Language

I'm sorry, but that's like quoting Bjarne Stroustrup on correct ISO C
usage.

Richard
 
T

Thomas Matthews

Arthur said:
Commas generally indicate pauses in speech.
[snip]

As my elementary school teacher stated, pauses in speech differ
from when climb up the four flights of stairs and when you are
sitting on the couch and resting. One would require many commas
after climbing a bunch of stairs. Less commas for the couch
potatoes.

--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
 

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

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top