delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/25/03:14:42

Message-Id: <199710250712.UAA05497@fep1-orange.clear.net.nz>
From: "Jamie Love" <jamie DOT love AT clear DOT net DOT nz>
To: <djgpp AT delorie DOT com>
Subject: Fw: Reading the command line
Date: Sun, 26 Oct 1997 03:59:15 +1300
MIME-Version: 1.0

---------
> From: H.W. Stockman <hwstock AT swcp DOT com>
> To: djgpp AT delorie DOT com
> Subject: Re: Reading the command line
> Date: Friday, October 24, 1997 09:08
> 
> Jon Seanor wrote:
> > 
> > Just a quick question.
> > 
> > I'm forever forgetting the syntax for reading the command line, i.e.
passing
> > it to the main function as parameters.  Do you know what the syntax is?
> > 
> > void main(char* argv[], int argc)        <---is this right?
> > {}
> 
> order reversed -- argc first.  That should be in just
> about any C book...

Shouldn't the naming be (to be exact and easier to read etc.)
int main(int argv, char *argv[])
 { }

??

***************************
J. Love
Quote of the day:

'Tis folly to be wise.
	-Thomas Gray
***************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019