main() arguments, was Re: typedef-ing an array
diamond@tkovoa
diamond at tkou02.enet.dec.com
Fri Jul 6 10:38:54 AEST 1990
In article <4241 at jato.Jpl.Nasa.Gov> kaleb at mars.UUCP (Kaleb Keithley) writes:
|In article <25273 at mimsy.umd.edu> chris at 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 at tkou02.enet.dec.com
This is me speaking. If you want to hear the company speak, you need DECtalk.
More information about the Comp.lang.c
mailing list