Path: utzoo!attcan!uunet!samsung!uakari.primate.wisc.edu!umriscc!mcs213f.cs.umr.edu!mcastle From: mcastle@mcs213f.cs.umr.edu (Mike Castle) Newsgroups: comp.lang.pascal Subject: Re: Getting the command line args Message-ID: <1611@umriscc.isc.umr.edu> Date: 6 Nov 90 06:55:35 GMT References: <950041@hpclapd.HP.COM> Sender: news@umriscc.isc.umr.edu Organization: University of Missouri - Rolla Lines: 19 In article <950041@hpclapd.HP.COM> defaria@hpclapd.HP.COM (Andy DeFaria) writes: >How does a running program access the command line arguments? I would like >to do this with Turbo Pascal. Well, looking in the manual (which you should have, cause you DID by the program :-), the function 'ParamCount' returns how many parameters were passed to the program, and the function 'ParamStr[I]' return's the I'th parameter. ParamStr[0] will return the name of the program running (i.e., it's own name, just in case you want it to erase its self after the first use :-) If you haven't created an .exe file yet, you can set the passed parms in the options menu ( alt-o,p ). Btw, this is on page 345-346 in the 'Reference Guide' manual. :-> -- Mike Castle | Life is like a clock: You can work constantly and be Nexus | right all the time, or not work at all and be right S087891@UMRVMA.UMR.EDU | at least twice a day. mcastle@cs.umr.edu | Love does not exist anymore.