Date: Fri, 18 Dec 1998 14:55:55 -0500 (EST) From: Daniel Reed To: djgpp AT delorie DOT com Subject: Re: Accessing command line from within DJGPP In-Reply-To: <367A3863.5658564@lrz-muenchen.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On Fri, 18 Dec 1998, Marcus Rohrmoser wrote: ) Define main as ) `int main(int argc, char** argv)` ) and you`ll have the number of arguments in `argc` and the values in ) argv[1] to argv[argc]. argv[argc+1] is NULL by definition. argv[0] is ) the program`s name. Actually, the values go from argv[1] to argv[argc-1], where argv[argc] is NULL by definition. The argument count includes *all* arguments, including the very first one (argv[0]). -- Daniel Reed It is better to be defeated on principle than to win on lies. -- Arthur Calwell