Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > FAQ incorrect?

Reply
Thread Tools

FAQ incorrect?

 
 
Kenny McCormack
Guest
Posts: n/a
 
      08-04-2006
In article <(E-Mail Removed)> ,
Andrew Poelstra <(E-Mail Removed)> wrote:
>On 2006-08-04, nroberts <(E-Mail Removed)> wrote:
>>
>> Kenny McCormack wrote:
>>
>>> Really, you need to re-think that post or you may lose your place in the
>>> he-man newbie-hating society.

>>
>> Hehehe...always interesting how one can inadvertently stir up a bee's
>> nest...
>>

>
>If by `one' you mean yourself, you did nothing wrong. If by `one' you
>mean McCormack, it wasn't inadvertent. He's a troll, and it's best you
>don't respond to his deranged mutterings.


Pot, kettle, black.

 
Reply With Quote
 
 
 
 
jacob navia
Guest
Posts: n/a
 
      08-04-2006
Richard Heathfield wrote:
> jacob navia said:
>
>>Walter Roberson wrote:

>
> <snip>
>
>>>According to C89 3.5.4.3,

>>
>>[snip]
>>
>>Irrelevant since that standard is no longer valid.

>
>
> It's perfectly valid according to a large number of compilers that support
> it and a huge number of programmers who use it. If we were to consider C89
> as invalid, then we would have no valid, widely-implemented C standard,
> which would be a ridiculous state of affairs.
>


OK OK.

When I bring a large number of compilers in many OSes
that support

#pragma once

you tell me that it is non-standard.

When I say that the standard is now

int main(void or int main(int argc,char *argv[])

you start with a large number of compilers that support C89.

There are many compilers that support the K&R standard (without
prototypes).

Should we recommned new users that they use that?

Let's standardize in the standard we use:

The *current* standard.

The rest is HISTORICAL and just confuses people
 
Reply With Quote
 
 
 
 
Richard Heathfield
Guest
Posts: n/a
 
      08-04-2006
jacob navia said:

> Richard Heathfield wrote:
>> jacob navia said:
>>
>>>Walter Roberson wrote:

>>
>> <snip>
>>
>>>>According to C89 3.5.4.3,
>>>
>>>[snip]
>>>
>>>Irrelevant since that standard is no longer valid.

>>
>>
>> It's perfectly valid according to a large number of compilers that
>> support it and a huge number of programmers who use it. If we were to
>> consider C89 as invalid, then we would have no valid, widely-implemented
>> C standard, which would be a ridiculous state of affairs.
>>

>
> OK OK.
>
> When I bring a large number of compilers in many OSes
> that support
>
> #pragma once
>
> you tell me that it is non-standard.


But your idea of "large number" is a relatively small number, whereas the
number of compilers conforming to C89 is considerably greater. In fact,
you'd be hard-pressed to find a C compiler in current use that did not
conform to C89 (modulo the odd bug), whereas it is so easy to find a C
compiler that does not support #pragma once that you managed it all by
yourself.

> When I say that the standard is now
>
> int main(void or int main(int argc,char *argv[])


you'd be wrong, because the first of your examples is a parenthesis short of
a declarator.

> you start with a large number of compilers that support C89.


Indeed. Note that int main(void) and int main(int argc, char *argv[]) or
their equivalents have been the forms recommended by clc for many years, so
I don't see what point you're trying to make here.

> There are many compilers that support the K&R standard (without
> prototypes).


Sure. Whilst they do not conform to C89 (at least, when invoked in K&R
mode), they nevertheless may prove useful to some people. K&R C is still
topical here.

> Should we recommned new users that they use that?


Only if they are obliged to use K&R compilers.

> Let's standardize in the standard we use:


It's not up to you and me to determine which flavours of C are topical here.
By longstanding convention, K&R C, C90, and now C99 are all topical in clc.

> The *current* standard.


Fine, as soon as it becomes as widely implemented as C90 currently is, which
won't be for many years.

> The rest is HISTORICAL and just confuses people


The kind of people who make good computer programmers are not the kind of
people to be confused easily by the fact that a newsgroup might discuss K&R
C, C90, /and/ C99.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
 
Reply With Quote
 
Frederick Gotham
Guest
Posts: n/a
 
      08-04-2006

Troll Alert: Kenny McCormack

The only way to deal with trolls is to limit your reaction to reminding
others not to respond to trolls.

--

Frederick Gotham
 
Reply With Quote
 
Frederick Gotham
Guest
Posts: n/a
 
      08-04-2006

Troll Alert: Kenny McCormack

The only way to deal with trolls is to limit your reaction to reminding
others not to respond to trolls.

--

Frederick Gotham
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      08-04-2006
jacob navia <(E-Mail Removed)> writes:
> Richard Heathfield wrote:
>> jacob navia said:
>>
>>>Walter Roberson wrote:

>> <snip>
>>
>>>>According to C89 3.5.4.3,
>>>
>>>[snip]
>>>
>>>Irrelevant since that standard is no longer valid.

>> It's perfectly valid according to a large number of compilers that
>> support it and a huge number of programmers who use it. If we were
>> to consider C89 as invalid, then we would have no valid,
>> widely-implemented C standard, which would be a ridiculous state of
>> affairs.
>>

>
> OK OK.
>
> When I bring a large number of compilers in many OSes
> that support
>
> #pragma once
>
> you tell me that it is non-standard.


Yes, because it is.

> When I say that the standard is now
>
> int main(void or int main(int argc,char *argv[])
>
> you start with a large number of compilers that support C89.


I don't see your point here; that didn't change between C89 and C99
(except for C99's explicit permission to have more
implementation-defined forms, but extensions were already permitted).

> There are many compilers that support the K&R standard (without
> prototypes).
>
> Should we recommned new users that they use that?


Of course not. There are few C compilers still in common use that
don't support at least the C89/C90 standard reasonably well. There
are even fewer platforms still in common use that don't have at least
*some* compiler that supports at least the C89/C90 standard, even if
the native compiler doesn't. There is no longer very much point in
worrying about pre-C89 compilers. On the other hand, if any users run
into a situation where they need to program in C on a system with no
modern compiler available, yes, this would be the place to ask for
advice.

> Let's standardize in the standard we use:
>
> The *current* standard.
>
> The rest is HISTORICAL and just confuses people


One more time. The full C89/C90 standard is widely implemented. The
C99 standard is not. Not everyone uses, or is able to use, the C99
standard. Even your own lcc-win32 doesn't implement all of it. That
is reality.

Will you, just once, *acknowledge* that plain fact? Or will you
continue to deny reality and make a fool of yourself? (I think I
already know the answer, but I'm always prepared to be pleasantly
surprised.)

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
Kenny McCormack
Guest
Posts: n/a
 
      08-04-2006
In article <oSPAg.12272$(E-Mail Removed)>,
Frederick Gotham <(E-Mail Removed)> wrote:
>
>Troll Alert: Kenny McCormack


Pot. Kettle. Black.

 
Reply With Quote
 
Frederick Gotham
Guest
Posts: n/a
 
      08-05-2006

The only way to deal with trolls is to limit your reaction to reminding
others not to respond to trolls.

--

Frederick Gotham
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      08-05-2006
Frederick Gotham <(E-Mail Removed)> writes:
> The only way to deal with trolls is to limit your reaction to reminding
> others not to respond to trolls.


Yes, we know.

Usually someone posts a single followup to anyone who responds to the
troll in question, and that generally works reasonably well. Starting
a new thread gives the troll more attention.

--
Keith Thompson (The_Other_Keith) (E-Mail Removed) <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
Jack Klein
Guest
Posts: n/a
 
      08-05-2006
On Fri, 04 Aug 2006 18:38:18 +0200, jacob navia
<(E-Mail Removed)> wrote in comp.lang.c:

> Walter Roberson wrote:
> > In article <(E-Mail Removed). com>,
> > nroberts <(E-Mail Removed)> wrote:
> >
> >>In the faq for this group:

> >
> >
> >>Q: What's the correct declaration of main()?

> >
> >
> >>for the two parameters, and you can use old-style syntax:

> >
> >
> >> int main()

> >
> >
> >>The way this is worded it makes one think that "int main()" is a valid
> >>declaration of main.

> >
> >
> > It is.
> >
> >
> >>However, main is allowed to only take two params
> >>of (int, char **) or 0, correct? In C is not an empty param list an
> >>"unspecified" param list?

> >
> >
> > According to C89 3.5.4.3,

>
> [snip]
>
> Irrelevant since that standard is no longer valid.


Jacob, you're getting to be a real PITA. Since the text is
essentially the same in the current standard, it makes no real
difference.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ or not FAQ? =?ISO-8859-15?Q?Juli=E1n?= Albo C++ 28 01-15-2007 04:33 AM
FAQ/FAQ notes site makeover Peter Michaux Javascript 22 11-27-2006 01:55 AM
FAQ - How do I direct someone to this FAQ? FAQ server Javascript 1 08-04-2006 10:13 PM
Upgrading to high speed, FAQ? David Wireless Networking 4 11-09-2004 08:43 PM
[de] Update of FAQ in German/FAQ auf Deutsch ueberarbeitet Josef 'Jupp' Schugt Ruby 0 09-22-2003 08:56 PM



Advertisments