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

  1. Path: sparky!uunet!psgrain!hippo!catpe!p1.f37.n7101.z5.fidonet.org!Shane.Greyvenstein
  2. From: Shane.Greyvenstein@p1.f37.n7101.z5.fidonet.org (Shane Greyvenstein)
  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: <1959.2A9FBDC9@catpe.alt.za>
  7. Date: Fri, 28 Aug 92 18:36:01 GMT
  8. Organization: FidoNet node 5:7101/37.1 - Top Byte, Verwoerdburg
  9. Lines: 37
  10.  
  11. Hi!
  12.  
  13.  >  vmoe>   How could one retrieve the on-line program
  14.  > parameters,
  15.  >  vmoe> such as the program name, or the whole command
  16.  > string
  17.  >  vmoe> from within the pascal program  ?
  18.  
  19. Do this, it should work, although I've never tried it <G>
  20.  
  21. ----- CUT HERE -----
  22.  
  23. var params  : paramstr;
  24.     i       : integer;
  25.  
  26.  
  27.  
  28.  
  29.  
  30. begin
  31.   params:='';
  32.  
  33.   for i:=0 to paramcount do     { Paramstr(0) is the path }
  34.   params:=params+paramstr(i);
  35. end.
  36.  
  37. ----- CUT HERE -----
  38.  
  39. Tell me if it worx :-)
  40.  
  41. Cherio,
  42. Shane
  43.  
  44. --  
  45. INTERNET: Shane.Greyvenstein@p1.f37.n7101.z5.fidonet.org
  46. via:  THE CATALYST BBS in Port Elizabeth, South Africa.
  47.        (catpe.alt.za)   +27-41-34-1122 HST or +27-41-34-2859, V32bis & HST.
  48.