Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!uupsi!sunic!news.funet.fi!uwasa.fi!ts From: ts@uwasa.fi (Timo Salmi) Newsgroups: comp.lang.pascal Subject: Re: Getting the command line args Message-ID: <1990Nov9.224331.19733@uwasa.fi> Date: 9 Nov 90 22:43:31 GMT References: <950041@hpclapd.HP.COM> <1990Nov6.214246.8138@wpi.WPI.EDU> <1365@netmbx.UUCP> Organization: University of Vaasa Lines: 28 In article <1365@netmbx.UUCP> docbrain@netmbx.UUCP (Frank Seidinger) writes: ... part deleted ... >This works fine, if you try to scan 'true' parameters. That means, that each >of the parameters in the given command line is seperated by whitespace. But >what can I do if i have to catch an argument like: > > program 'This should be one long parameter' > >I never solved this problem in Turbo Pascal. From my FAQ: 18. ***** Q: How can I obtain the entire command line (spaces and all)? A: ParamCount and ParamStr are for parsed parts of the command line and cannot be used to get the command line exactly as it was. For obtaining the command line unaltered, use, for example type CommandLineType = string[127]; var CommandLinePtr : ^CommandLineType; begin CommandLinePtr := Ptr(PrefixSeg, $80); writeln (CommandLinePtr^); ................................................................... Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) School of Business Studies, University of Vaasa, SF-65101, Finland Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun