home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / pascal / 5198 < prev    next >
Encoding:
Internet Message Format  |  1992-09-04  |  1.1 KB

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