🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.msdos.programmer
Article #1166

Re: Pascal program works but not C program!

#1166
From: The Amorphous Mass
Date: Mon, 08 Jan 1996 07:25
44 lines
2229 bytes
On Sun, 7 Jan 1996, Tasmaniac wrote:
> >> void main(int argc,char *argv[])
> >   ^-----------------------------This one too, but not too serious
> why is this a problem ?

  Read the FAQ.  Question 11.12.

> It's 100% legal to declare main as any of the following

  If "legal" means "allowed by your compiler right now" then you're 
right.  If "legal" means allowed by the ANSI Standard than you're not.  
This newsgroup is concerned with ANSI Standard C.  The folks over in
comp.os.msdos.programmer.* might be more forgiving. :)

#if 0
> void main (void)
#endif
> int main (void)
#if 0
> void main (int argc, char *argv[])
#endif
> int main (int argc, char *argv[])
#if 0
> void main (int argc, char **argv)
#endif
> int main (int argc, char **argv)
#if 0
> void main (int argc, char *argv[], char *envp[])
> int main (int argc, char *argv[], char *envp[])
> void main (int argc, char *argv[], char **envp)
> int main (int argc, char *argv[], char **envp)
> void main (int argc, char **argv, char *envp[])
> int main (int argc, char **argv, char *envp[])
> void main (int argc, char **argv, char **envp)
> int main (int argc, char **argv, char **envp)
#endif
> 
> erhm..  that should be it, I may have missed one...

  Actually you included 11 too many. :)

/**James Robinson***********************            
  "If a fatal error occurs, the program should not be allowed to continue."
 -- Oracle Pro*C User's Guide         *************james-robinson@uiowa.edu**/
Technical Details
Message-ID: <Pine.A32.3.91.960108011854.32363I-100000@black.weeg.uiowa.edu>
Path: arc1-ca.pugleaf.net!black.weeg.uiowa.edu!robinson
References: <4cdpr2$psi@lugb.latrobe.edu.au> <Pine.SV4.3.91-heb-2.04.960104114930.16292A-100000@cs.technion.ac.il> <4cp3vc$8nh@brahms.tfi.be>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!black.weeg.uiowa.edu!robinson
From: The Amorphous Mass <robinson@blue.weeg.uiowa.edu>
Newsgroups: alt.msdos.programmer,comp.lang.c
Subject: Re: Pascal program works but not C program!
Date: Mon, 8 Jan 1996 01:25:25 -0600
Organization: University of Iowa, Iowa City, IA, USA
Distribution: world
Message-ID: <Pine.A32.3.91.960108011854.32363I-100000@black.weeg.uiowa.edu>
References: <4cdpr2$psi@lugb.latrobe.edu.au>  <Pine.SV4.3.91-heb-2.04.960104114930.16292A-100000@cs.technion.ac.il> <4cp3vc$8nh@brahms.tfi.be>
NNTP-Posting-Host: black.weeg.uiowa.edu
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Sender: robinson@black.weeg.uiowa.edu
In-Reply-To: <4cp3vc$8nh@brahms.tfi.be>