Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!whuxl!whuxlm!akgua!gatech!seismo!brl-adm!brl-smoke!smoke!woody%Juliet.Caltech.Edu@cit-hamlet.ARPA From: woody%Juliet.Caltech.Edu@cit-hamlet.ARPA Newsgroups: net.lang.c Subject: Command line arguments Message-ID: <1647@brl-smoke.ARPA> Date: Sat, 8-Mar-86 21:35:24 EST Article-I.D.: brl-smok.1647 Posted: Sat Mar 8 21:35:24 1986 Date-Received: Tue, 11-Mar-86 01:13:35 EST Sender: news@brl-smoke.ARPA Lines: 20 For those who may be interested in such things as Icon-driven environments, this is what the Macintosh computer does under the Macintosh Megamax C compiler: (other implementations may vary) When you double click a program icon, the file name of the program gets passed to the C program through argc/argv; when you shift click some documents before double clicking a program icon (thereby telling the program to use those documents), the names of the documents get passed to the C program through argc/argv--one document name for every element in argv[]. And when you shift click some documents, select a program, and select the "Print" option from one of the Finder (read: Macintosh shell) menus, the argument "-p" gets passed to the C program in argv[]. So, the Macintosh does support passing arguments to the program; however, it's not as flexible as a command line entry under the Unix shell where command line arguments may be just about any arbitrary string. - William Woody NET Woody%Romeo@Hamlet.Caltech.Edu USNAIL 1-54 Lloyd, Caltech / Pasadena, CA 91126