Path: utzoo!utgpu!news-server.csri.toronto.edu!me!mipscan Newsgroups: comp.lang.pascal From: rio@image.me.utoronto.ca (Oscar del Rio) Subject: Re: Getting the command line args Message-ID: <90Nov6.193651est.4323@image.me.utoronto.ca> Organization: University of Toronto, Mechanical Engineering, Canada References: <950041@hpclapd.HP.COM> <1611@umriscc.isc.umr.edu> <2416@oucsace.cs.OHIOU.EDU> Date: 7 Nov 90 14:25:14 GMT In article <2416@oucsace.cs.OHIOU.EDU> tswingle@oucsace.cs.OHIOU.EDU (Tom Swingle) writes: >In article <1611@umriscc.isc.umr.edu> mcastle@mcs213f.cs.umr.edu (Mike Castle) writes: >>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 :-) > >Just a small syntactical point, ParamStr is a function rather than an array, so >the call should be 'ParamStr(I)' rather than 'ParamStr[I]'. Probably most >everybody out there caught this also, but I thought I would post this in case >someone was having trouble. Of course, like he said, it is in the manual, >which you all DO have a copy of don't you? :-) >-- Besides, I think that ParamStr(0) does not return the name of the program if you are using DOS 2.x. (Yes, some people are still using DOS 2.11 :-). Am I wrong? I have never used TURBO with DOS 2.x but I read it somewhere (maybe in the manual :-) Bye.