From: Keith Thompson on
BruceS <bruces42(a)hotmail.com> writes:
[...]
> You've made clear what I was pointing out less directly. The lack
> of // comments is only when strictly adhering to the C90 (I keep
> calling it "C89"; are the two terms equivalent or am I just getting it
> wrong?) standard. Patrick's point is well taken, that these auto-
> terminating comments can help avoid certain errors. Of course, that
> would also avoid some of the humor in the early post.

Yes, C89 and C90 are (two documents that describe) the same language.
ANSI published the first C standard in 1989. ISO adopted ANSI's
standard in 1990; they added some non-normative introductory material
and renumbered the sections (ANSI sections 3 and 4 are ISO sections
6 and 7), but the text is otherwise unchanged. ANSI officially
adopted the ISO C90 standard shortly thereafter.

There was a 1995 amendment that added some relatively minor features.

The 1999 standard was issued directly by ISO (and ANSI adopted it).
There have been three Technical Corrigenda since then (folded
into <http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf>,
which isn't *quite* 100% official but it's close enough). Work is
in progress on C201X.

--
Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
From: Ben Bacarisse on
Keith Thompson <kst-u(a)mib.org> writes:
about C standards:
<snip>
> The 1999 standard was issued directly by ISO (and ANSI adopted it).
> There have been three Technical Corrigenda since then (folded
> into <http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf>,
> which isn't *quite* 100% official but it's close enough).

I thought there had been only two TCs. Not that it really matters how
many there are, but if there is a third I can't find it and I'd like
to have a look.

> Work is in progress on C201X.

--
Ben.
From: Keith Thompson on
Ben Bacarisse <ben.usenet(a)bsb.me.uk> writes:
> Keith Thompson <kst-u(a)mib.org> writes:
> about C standards:
> <snip>
>> The 1999 standard was issued directly by ISO (and ANSI adopted it).
>> There have been three Technical Corrigenda since then (folded
>> into <http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf>,
>> which isn't *quite* 100% official but it's close enough).
>
> I thought there had been only two TCs. Not that it really matters how
> many there are, but if there is a third I can't find it and I'd like
> to have a look.

Definitely three.

Go to <http://webstore.ansi.org/> and enter "9899" as the document
number; all three TCs are available as free downloads.

The C99 standard itself is available for the low low price of $275,
$30, $349, or $235, depending on which ADD TO CART button you click.
(I think I paid $18 for my copy).

--
Keith Thompson (The_Other_Keith) kst-u(a)mib.org <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
From: Larry__Weiss on
Mensanator wrote:
> On Mar 18, 2:43 pm, Keith Thompson <ks...(a)mib.org> wrote:
>> BruceS <bruce...(a)hotmail.com> writes:
>>
>> [...]
>>
>>> <OT> AIUI, C++ accepts /* */ multiline comments without artificially
>>> terminating said comments at the end of line. I don't have a C++
>>> Standard in front of me, so I can't confirm that it isn't simply an
>>> artifact of environments in which I've written C++, but I'm relatively
>>> confident that these work the same as in C. </OT>
>> In both C and C++, a comment that begins with /* is not
>> "artificially" terminated at the end of the line. Instead, it's
>> "artificially" terminated by the next */. (In other words, I'm
>> not sure what's so artificial about it.)
>>
>>> According to The C Standard, 6.4.9p2, C allows comments that *do*
>>> automatically terminate at the end of the line, just as this style of
>>> comment works in C++.
>> [...]
>>
>> Yes, both C and C++ now permit comments introduced by // and
>> terminated by the end of the line. These were introduced in BCPL,
>> one of C's distant ancestors from the 1960s. But they were dropped
>> from C, and only reintroduced by the 1999 ISO C standard (which
>> superseded the 1990 ISO C standard, which itself superseded the
>> de facto standard of Kernighan & Ritchie's book). C++ has always
>> supported // comments.
>>
>> Today, most C compilers fully support at least the C90 standard,
>> but only a subset of the C99 standard. // comments are very widely
>> supported. On the other hand, they can be rejected if you choose
>> to invoke your C compiler in a strict C90-conforming mode, or if
>> you're using a sufficiently old compiler, so /*...*/ comments are
>> arguably more portable. // comments can also cause problems in
>> Usenet posts; implicit line wrapping can introduce syntax errors.
>>
>> (Most people here in comp.lang.c already know this stuff; I'm posting
>> it mostly for the benefit of those in alt.folklore.computers
>
> Hey! Some of us folklorists actually DO know how to program.
>

At least we think we remember that we know how to program.
And some of us still demonstrate it by actually programming from time to time.

Some of us wonder why we need all of these languages...
http://en.wikipedia.org/wiki/List_of_programming_languages

- Larry
From: Ben Bacarisse on
Keith Thompson <kst-u(a)mib.org> writes:

> Ben Bacarisse <ben.usenet(a)bsb.me.uk> writes:
>> Keith Thompson <kst-u(a)mib.org> writes:
>> about C standards:
>> <snip>
>>> The 1999 standard was issued directly by ISO (and ANSI adopted it).
>>> There have been three Technical Corrigenda since then (folded
>>> into <http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf>,
>>> which isn't *quite* 100% official but it's close enough).
>>
>> I thought there had been only two TCs. Not that it really matters how
>> many there are, but if there is a third I can't find it and I'd like
>> to have a look.
>
> Definitely three.

So there are.

> Go to <http://webstore.ansi.org/> and enter "9899" as the document
> number; all three TCs are available as free downloads.

Thanks. I tried to find it on WG14's web pages and could see only
two. The main page does talk about TC3 but there is no text for it.
It turns out you can get it from the ISO as well: http://www.iso.org

> The C99 standard itself is available for the low low price of $275,
> $30, $349, or $235, depending on which ADD TO CART button you click.
> (I think I paid $18 for my copy).

! The last time I tried to get the older C90 from the BSI it was 400
pounds sterling.

--
Ben.
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Prev: System Calls
Next: Warning to newbies