home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!psgrain!hippo!catpe!p17.f120.n7102.z5.fidonet.org!Adriaan.Wessels
- From: Adriaan.Wessels@p17.f120.n7102.z5.fidonet.org (Adriaan Wessels)
- Sender: ufgate@catpe.alt.za (newsout1.26)
- Newsgroups: comp.lang.pascal
- Subject: How can I retrieve the command string from within Pascal program ?
- Message-ID: <2048.2AA7A703@catpe.alt.za>
- Date: Thu, 03 Sep 92 22:33:00 GMT
- Organization: FidoNet node 5:7102/120.17 - Interlink BBS, CT
- Lines: 24
-
-
- Answering a msg of <02 Sep 92>, from Jozsef Ferincz to All:
-
- ParamCount give the total number of parameters
- ParamStr(0) gives you the progam name
- ParamStr(n) gives you the nth parameter
-
- To obtain the while command line use the below:
-
- type
- CmdLineArray = string[127];
- var
- CmdLine : ^CmdLineArray;
- begin
- CmdLine:=Ptr( PrefixSeg, $80 ); {The command line's adress is stored at } WriteLn(CmdLine^) {offset 80h in the Program Segmeny Prefix }
- end.
-
- Ciao,
- Adriaan
-
- --
- INTERNET: Adriaan.Wessels@p17.f120.n7102.z5.fidonet.org
- via: THE CATALYST BBS in Port Elizabeth, South Africa.
- (catpe.alt.za) +27-41-34-1122 HST or +27-41-34-2859, V32bis & HST.
-