Paul Gilmartin wrote:

And the UNIX argv[] vector is terminated by a NULL (0) pointer, not -1.

John McKown wrote:

I am under the distinct impression that the number of elements
in argv[] is the value in argc.

You're both right. 
http://www.gnu.org/software/libc/manual/html_node/Program-Arguments.html

Also, there's the 3-argument form of main() in Unix, non-POSIX.

int main (intargc, char *argv[], char *envp[])

--
Jack J. Woehr     # Science is more than a body of knowledge. It's a way of
www.well.com/~jax # thinking, a way of skeptically interrogating the universe
www.softwoehr.com # with a fine understanding of human fallibility. - Carl Sagan

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to