Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!ysub!psuvm!cunyvm!rohvm1!rbyaml From: RBYAML@ROHVM1.BITNET (Aengus Lawlor) Newsgroups: comp.windows.ms Subject: Re: PATH for Windows applications Message-ID: <91164.173755RBYAML@ROHVM1.BITNET> Date: 13 Jun 91 22:37:55 GMT References: <1991Jun6.095516.86840@vaxc.cc.monash.edu.au> <10816@plains.NoDak.edu> Organization: Rohm and Haas Company Lines: 19 In article <10816@plains.NoDak.edu>, coffman@plains.NoDak.edu (Clark Coffman) says: > > You know, that would work, but I've always wondered why professional >programmers don't use argv[0] to find the path! I'm what my friends call >a sportsman programmer in C and I use argv[0] to find where my programs >have been started up (so they can find their configuration files). Why >don't others use this? It returns the full path, including the drive, >to where ever the user has stored your program. I guess I'm assuming that >Pascal and other languages have a similar feature? > Mainly because earlier versions of DOS (2.x, and possibly 3.0 ?) didn't return argv[0]. Some people are still running those versions. -- RBYAML@ROHMHAAS.COM Aengus Lawlor RBYAML@ROHVM1.BITNET (who used to be ALAWLOR@DIT.IE) "How about some of that famous Dublin wit, Barman?" "Certainly, sir. Would that be Dry or Sparkling?"