473,785 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FAQ incorrect?

In the faq for this group:

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

A: There are two valid declarations:

int main(void)
int main(int argc, char **argv)

although they can be written in a variety of ways. The second parameter
may be declared char *argv[] (see question 6.4), you can use any names
for the two parameters, and you can use old-style syntax:

int main()

int main(argc, argv)
int argc; char **argv;

.......... http://c-faq.com/ansi/maindecl.html

The way this is worded it makes one think that "int main()" is a valid
declaration of main. However, main is allowed to only take two params
of (int, char **) or 0, correct? In C is not an empty param list an
"unspecifie d" param list? In that case "int main()" would be invalid
as it matches neither of the standard signatures.

Another faq claiming to represent this group has the following text for
the same Q:

A: Either int main(), int main(void), or int main(int argc,
char *argv[]) (with alternate spellings of argc and *argv[]
obviously allowed). See also questions 11.12b to 11.15 below.

References: ISO Sec. 5.1.2.2.1, Sec. G.5.1; H&S Sec. 20.1 p.
416; CT&P Sec. 3.10 pp. 50-51.

............... http://www.faqs.org/faqs/C-faq/faq/

It also has "int main()" but has no reasoning for its validity except
ref to the std I don't have access to. Is that truely a valid
signature? I always thought you _needed_ (void).

Aug 4 '06
49 1709
Keith Thompson wrote:
Frederick Gotham <fg*******@SPAM .comwrites:
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.
Not actually a new thread, at least for most of us. It's a change in
subject in an existing thread.

Brian
Aug 5 '06 #21
Default User posted:
Not actually a new thread, at least for most of us. It's a change in
subject in an existing thread.

I just clicked "Reply", and then changed what was written in the "Subject"
textbox... didn't think it would have an effect on threading?

--

Frederick Gotham
Aug 5 '06 #22
On Sat, 05 Aug 2006 13:59:04 GMT, Frederick Gotham
<fg*******@SPAM .comwrote:
>Default User posted:
>Not actually a new thread, at least for most of us. It's a change in
subject in an existing thread.


I just clicked "Reply", and then changed what was written in the "Subject"
textbox... didn't think it would have an effect on threading?
Depends on how people choose to display threads. My reader can start a
new thread when the subject changes, or not. Usually, I find it useful
to start a new thread, since the topic has changed.

--
Al Balmer
Sun City, AZ
Aug 5 '06 #23
Frederick Gotham <fg*******@SPAM .comwrites:
Default User posted:
>Not actually a new thread, at least for most of us. It's a change in
subject in an existing thread.
>
I just clicked "Reply", and then changed what was written in the "Subject"
textbox... didn't think it would have an effect on threading?
I had already read the previous articles in the thread, so my
newsreader didn't display them. My newsreader probably displayed your
article as continuation of the thread (I'm not sure how or whether it
distinguishes that), but since the subject header didn't start with
"Re:" I assumed it was a new thread. I had to check the headers to
verify that it was a followup to something else.

Changing the subject header in a followup us usually not a good idea;
if you do so, it's usually a good idea to refer to the previous
subject ("New Subject (was: Old Subject)".

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <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.
Aug 5 '06 #24
Al Balmer wrote:
On Sat, 05 Aug 2006 13:59:04 GMT, Frederick Gotham
<fg*******@SPAM .comwrote:
Default User posted:
Not actually a new thread, at least for most of us. It's a change
in >subject in an existing thread.


I just clicked "Reply", and then changed what was written in the
"Subject" textbox... didn't think it would have an effect on
threading?

Depends on how people choose to display threads. My reader can start a
new thread when the subject changes, or not. Usually, I find it useful
to start a new thread, since the topic has changed.

You can view it that way, but it's not actually a new thread. By that I
mean the poster did not create a new thread, but used the reply
mechanism with a change in subject. The references will be there to
link it to the previous messages in the thread.


Brian
Aug 5 '06 #25
On 5 Aug 2006 19:42:43 GMT, "Default User" <de***********@ yahoo.com>
wrote:
>Al Balmer wrote:
>On Sat, 05 Aug 2006 13:59:04 GMT, Frederick Gotham
<fg*******@SPA M.comwrote:
Default User posted:

Not actually a new thread, at least for most of us. It's a change
in >subject in an existing thread.
>

I just clicked "Reply", and then changed what was written in the
"Subject" textbox... didn't think it would have an effect on
threading?

Depends on how people choose to display threads. My reader can start a
new thread when the subject changes, or not. Usually, I find it useful
to start a new thread, since the topic has changed.


You can view it that way, but it's not actually a new thread.
If I choose to view it that way, it is. As far as I'm concerned, if I
tell Agent to start a new thread on a subject change, there's no
discernible difference (I don't display the references header.)
By that I
mean the poster did not create a new thread, but used the reply
mechanism with a change in subject.
Yes, we know. He said that.
The references will be there to
link it to the previous messages in the thread.
We know that, too.

--
Al Balmer
Sun City, AZ
Aug 6 '06 #26
Al Balmer wrote:
On 5 Aug 2006 19:42:43 GMT, "Default User" <de***********@ yahoo.com>
wrote:
You can view it that way, but it's not actually a new thread.

If I choose to view it that way, it is. As far as I'm concerned, if I
tell Agent to start a new thread on a subject change, there's no
discernible difference (I don't display the references header.)
But that's not the normal definition of a new thread.
By that I
mean the poster did not create a new thread, but used the reply
mechanism with a change in subject.

Yes, we know. He said that.
Ok.
Brian

Aug 6 '06 #27
Frederick Gotham wrote:
Default User posted:
>Not actually a new thread, at least for most of us. It's a change
in subject in an existing thread.

I just clicked "Reply", and then changed what was written in the
"Subject" textbox... didn't think it would have an effect on
threading?
It doesn't, in proper news readers that use the 'references' header
field correctly. Some stupid systems, such as Google, ignore that
field and depend on the subject header alone.

--
Chuck F (cb********@yah oo.com) (cb********@mai neline.net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home .att.netUSE maineline address!

Aug 6 '06 #28

Andrey Tarasevich wrote:
nroberts wrote:
...
although they can be written in a variety of ways. The second parameter
may be declared char *argv[] (see question 6.4), you can use any names
for the two parameters, and you can use old-style syntax:

int main()

int main(argc, argv)
int argc; char **argv;

......... http://c-faq.com/ansi/maindecl.html

The way this is worded it makes one think that "int main()" is a valid
declaration of main. However, main is allowed to only take two params
of (int, char **) or 0, correct? In C is not an empty param list an
"unspecifie d" param list? In that case "int main()" would be invalid
as it matches neither of the standard signatures.

The way it is worded (seeing the "old-style syntax" mentioned and so on) makes
it clear that it is specifically referring to the declaration of 'main', which
is a part of _definition_ of 'main'. When the empty parameter list '()' is used
in a definition, it always means 'no parameters' (equivalent to '(void)'), not
'unspecified parameters'.
...
It also has "int main()" but has no reasoning for its validity except
ref to the std I don't have access to. Is that truely a valid
signature? I always thought you _needed_ (void).
...

Only in the declaration that is not a definition. In a definition '()' and
'(void)' mean the same thing - no parameters.
Not quite the same thing. Only the definition with (void)
serves as a prototype.

Aug 7 '06 #29

"Keith Thompson" <ks***@mib.orgw rote in message
news:ln******** ****@nuthaus.mi b.org...
If you'll put together a coherent and consistent set of topicality
guidelines, let us know and we might consider it (no guarantees of
course)
Why are you so paternalistic? Nobody cares what you have to say or what
rules you want to impose upon us. You post enough on your own, that you
should have your own newsgroup... And, you could block me, Kenny, Jacob,
etc. or anyone you're to immature to deal with without comment...
Rod Pemberton
Aug 8 '06 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
14400
by: Michelle Hillard | last post by:
Hi guys, would appreciate if you can shed some light on this. Sorry to be a pain, can you tell me what is wrong with the following: for /F %%i in ('dir /b /on c:\bcp\pc*.txt') do bcp Inventory..pc in %%i -fc:\bcp\bcp.fmt -T -S CHICKYy where CHICKYy is the server bcp.fmt
2
1280
by: Linda Wienholt | last post by:
I have two usercontrols on the home page of my website. They are intermitently sending incorrect HTML to the browser, which results in a textbox being rendered with the wrong width. Either both controls render correctly or both are incorrect but never a mixture. When they are rendered correctly the source looks like <input name="Header2:txtKeyword" type="text" id="Header2_txtKeyword" style="width:80px;" / When incorrect the source looks...
1
3931
by: murphy | last post by:
Hi, I've been seeing two symptoms with my asp.net site that have started recently after a long period of smooth running. As others on our team make changes to referenced dll's I find that I get the following errors from time to time. Apparently the following procedure alleviates the problems: -Reboot (clears locks on following directory)
3
3350
by: murphy | last post by:
Hi, I've been seeing two symptoms with my asp.net site that have started recently after a long period of smooth running. As others on our team make changes to referenced dll's I find that I get the following errors from time to time. Apparently the following procedure alleviates the problems:
4
2757
by: Peter Ritchie | last post by:
Does anyone know how to suppress a specific warning for a line or block of code in C#? C++ has a nice facility to disable a warning for a block of code with #pragma for warnings that are incorrect or don't apply. For example, the following code generates an CS0628 because CS0628 makes an incorrect assumption that "protected" applies only to inheritance: public sealed class Class { EmbeddedClass utility = new EmbeddedClass();
6
2648
by: ypjofficial | last post by:
HI, I have following terrific confusion. class test { public: int i; int * j; int **k;
2
4858
by: mankolele | last post by:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Simple Database Connection</title> </head> <body bgcolor="white"> <?php $connection = mysql_connect("localhost", "root", "phpmysql"); $select_db = mysql_select_db("procdumy", $connection);
6
8600
by: trevor | last post by:
Incorrect values when using float.Parse(string) I have discovered a problem with float.Parse(string) not getting values exactly correct in some circumstances(CSV file source) but in very similar circumstances(XML file source) and with exactly the same value it gets it perfectly correct all the time. These are the results I got, XML is always correct, CSV are only incorrect for some of the values (above about 0.01) but always gives the...
1
2405
by: ndawg123 | last post by:
Hey guys what im trying to do is write a yatzee game with C. And im stuck already and its the start?!?! I want the user to type there 5 numbers. i.e My program so far does this Please enter dice Values:
0
8330
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new records there is an error "Incorrect syntax near '-'. Must declare the scalar variable "@UserName". I worked out in design view,code is automatically generated.Iam not able fix the error. Iam working with Visual Web Developer-2005 Express Edition
0
9481
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10095
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.