Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!ames!haven!decuac!shlump.nac.dec.com!tkou02.enet.dec.com!diamond From: diamond@tkou02.enet.dec.com (diamond@tkovoa) Newsgroups: comp.lang.c Subject: Re: main() arguments, was Re: typedef-ing an array Message-ID: <1831@tkou02.enet.dec.com> Date: 6 Jul 90 00:38:54 GMT References: <78627@srcsip.UUCP> <78633@srcsip.UUCP> <25247@mimsy.umd.edu> <12433@sun.udel.edu> <4238@jato.Jpl.Nasa.Gov> <25273@mimsy.umd.edu> <4241@jato.Jpl.Nasa.Gov> Reply-To: diamond@tkou02.enet.dec.com (diamond@tkovoa) Organization: Digital Equipment Corporation Japan , Tokyo Lines: 19 In article <4241@jato.Jpl.Nasa.Gov> kaleb@mars.UUCP (Kaleb Keithley) writes: |In article <25273@mimsy.umd.edu> chris@mimsy.umd.edu (Chris Torek) writes: ||attribution lost: |||I know that both UNIX and DOS (M'soft C compilers anyway) support |||char **envp ... as the third parameter to main. || ||to write a portable program, you must not use this invisible third argument. | |Can you quote a reference to this assertion? Brian W. Kernighan and Dennis M. Ritchie, _The_C_Programming_Language_, Prentice-Hall, 1978. Page 110. "When main is called to begin execution, it is called with two arguments." I've heard rumors that there are other references on the topic too, including a newer edition of the cited book. -- Norman Diamond, Nihon DEC diamond@tkou02.enet.dec.com This is me speaking. If you want to hear the company speak, you need DECtalk.