From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,814d0ec938d6e4da X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-26 23:17:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.infostrada.it!newsfeeder.edisontel.com!skynet.be!skynet.be!news-x2.support.nl!psinet-eu-nl!psiuk-p4!uknet!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: How to find directory where the program is? Date: Fri, 26 Apr 2002 09:09:32 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <3CC6D15A.2070509@mail.com> <3cc73115.426446486@news.cis.dfn.de> <3CC9459E.7A49A4F7@nbi.dk> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1019826574 26494 136.170.200.133 (26 Apr 2002 13:09:34 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 26 Apr 2002 13:09:34 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:23163 Date: 2002-04-26T13:09:34+00:00 List-Id: Very true - but still you need *some* method for an executable to find related files. Hard coding is a bad thing. Things like logical names or environment variables are going to be system dependent. You could ask the user to enter a path name somewhere in the program (command line parameter, text field on the main screen, etc.) but how are you going to remember the path name between executions without resorting to a registry entry, environment variable, etc., all of which are going to be system dependent? Most OS's have some means for keeping that kind of thing around somewhere, just that it isn't going to be a "portable" answer. Its the sort of thing that Ada has been very good at hiding in the past - maybe that's something that needs to be in an OS Interface package? MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com "Jacob Sparre Andersen" wrote in message news:3CC9459E.7A49A4F7@nbi.dk... > > Considering that many systemadministrators insist on keeping > executables, documentation and system-wide configurations in > separate locations, it is not neccessarily a good idea to > hard-code the relative or absolute locations of these files. >