Path: utzoo!attcan!uunet!lll-winken!lll-tis!oodis01!uplherc!sp7040!obie!wsccs!rargyle From: rargyle@wsccs.UUCP (Bob Argyle) Newsgroups: comp.sys.atari.st Subject: Re: Megamax v1.1 Bug? Summary: first argument is program name Keywords: argc,argv Message-ID: <544@wsccs.UUCP> Date: 21 May 88 00:37:10 GMT References: Lines: 17 In article , paone@topaz.rutgers.edu (Phil Paone) writes: > > I have been playing with my v1.1 of Megamax C and found what appears > to be a bug in c lib. argc is being initialized to 1 instead of 0 so > even when no arguments are passed, argc is 1. I went into the library > and patched this up, but the argv also appears to be off. ... > Phil Paone ... > "Admiral...There be whales here" There is apparently one unusable argument passed, the name of the program. argv[1] _always_ is the first argument after the program name. So argc = 2 so one can for (i=1;i