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=-1.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC 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-23 12:26:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!deine.net!teaser.fr!enst!enst.fr!not-for-mail From: "Beard, Frank [Contractor]" Newsgroups: comp.lang.ada Subject: RE: How to find directory where the program is? Date: Tue, 23 Apr 2002 15:24:33 -0400 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: avanie.enst.fr 1019589963 89175 137.194.161.2 (23 Apr 2002 19:26:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Tue, 23 Apr 2002 19:26:03 +0000 (UTC) Return-Path: X-Mailer: Internet Mail Service (5.5.2650.21) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:23006 Date: 2002-04-23T15:24:33-04:00 I pretty sure GNAT has an OS package that provides that functionality. Or, if you have access to a POSIX binding, call Get_Working_Directory in the POSIX.Process_Environment package. You can use Pascal Obry's binding for Windows, or get Florist for several unix flavors. The links can be found from www.adapower.com. Frank -----Original Message----- From: Preben Randhol [mailto:randhol+abuse@pvv.org] Sent: Tuesday, April 23, 2002 2:29 PM To: comp.lang.ada@ada.eu.org Subject: How to find directory where the program is? How can one in Ada95 find out from which directory the Ada program is stored in. I mean I need to find out if my program is stored in /usr/bin/ or /usr/local/bin or some other directory. Does anybody know how I can do this. Note that current directory is not equal to the directory the program is stored in. I use GNAT so if GNAT has some routines for this that I have missed, please tell me. I'll make it portable later if needed. Thanks for any hints in advance. No it is not a homework (neither am I a student taking courses) it is for my Glosa program (http://www.pvv.org/~randhol/Ada95/Glosa/). Preben -- "Jeg tror nordmenn har glemt hvordan de tilbreder fisk. De er mest opptatt av firkantet fisk." -- Kristian Kristiansen, yrkesfisker, aftenposten.no 19/04/02 _______________________________________________ comp.lang.ada mailing list comp.lang.ada@ada.eu.org http://ada.eu.org/mailman/listinfo/comp.lang.ada