home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / pascal / 5107 < prev    next >
Encoding:
Text File  |  1992-08-30  |  1.8 KB  |  58 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!darwin.sura.net!Sirius.dfn.de!math.fu-berlin.de!fub!ferincz
  3. From: ferincz@methan.chemie.fu-berlin.de (Jozsef Ferincz)
  4. Subject: Re: How can I retrieve the command string from within Pascal program ?
  5. References: <1959.2A9FBDC9@catpe.alt.za>
  6. Date: Sun, 30 Aug 1992 17:12:24 GMT
  7. Reply-To: ferincz@methan.chemie.fu-berlin.de
  8. Organization: Free University of Berlin, Organic Chemistry
  9. Message-ID: <PTJ6TTB@methan.chemie.fu-berlin.de>
  10. Lines: 46
  11.  
  12. Shane.Greyvenstein@p1.f37.n7101.z5.fidonet.org (Shane Greyvenstein) writes:
  13.  
  14. >Hi!
  15. >
  16. > >  vmoe>   How could one retrieve the on-line program
  17. > > parameters,
  18. > >  vmoe> such as the program name, or the whole command
  19. > > string
  20. > >  vmoe> from within the pascal program  ?
  21. >
  22. >Do this, it should work, although I've never tried it <G>
  23. >
  24. >----- CUT HERE -----
  25. >
  26. >var params  : paramstr;
  27. >    i       : integer;
  28. >
  29. >
  30. >
  31. >
  32. >
  33. >begin
  34. >  params:='';
  35. >
  36. >  for i:=0 to paramcount do     { Paramstr(0) is the path }
  37.                                                       ^^^^
  38.                                                       program name with a path
  39. >  params:=params+paramstr(i);
  40. >end.
  41. >
  42. >----- CUT HERE -----
  43. >
  44. >Tell me if it worx :-)
  45. >
  46. >Cherio,
  47. >Shane
  48. >
  49. >--  
  50. >INTERNET: Shane.Greyvenstein@p1.f37.n7101.z5.fidonet.org
  51. >via:  THE CATALYST BBS in Port Elizabeth, South Africa.
  52. >       (catpe.alt.za)   +27-41-34-1122 HST or +27-41-34-2859, V32bis & HST.
  53. -- 
  54. Jozsef Ferincz               INTERNET : ferincz@methan.chemie.fu-berlin.de
  55. Freie Universitaet Berlin             : ferincz@ki1.chemie.fu-berlin.de   
  56. Takustr.3, D-1000 Berlin 33  UUCP     : ferincz@fub.uucp                  
  57. Fax : +(49 30) 838 51 63     Tel.: +(49 30) 838 26 77, 838 53 63          
  58.