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.1 required=5.0 tests=BAYES_00,FREEMAIL_FROM, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,814d0ec938d6e4da X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-04-23 14:11:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!fu-berlin.de!uni-berlin.de!b0e74.pppool.DE!not-for-mail From: "Joachim Schr�er" Newsgroups: comp.lang.ada Subject: Re: How to find directory where the program is? Date: Tue, 23 Apr 2002 23:04:10 +0200 Message-ID: References: NNTP-Posting-Host: b0e74.pppool.de (213.7.14.116) X-Trace: fu-berlin.de 1019596314 8297286 213.7.14.116 (16 [76083]) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Xref: archiver1.google.com comp.lang.ada:23016 Date: 2002-04-23T23:04:10+02:00 List-Id: I think Ada.Command_Line.Command_Name does the job. The function returns the complete pathname of the current exe. Best regards J. Schr�er "Preben Randhol" schrieb im Newsbeitrag news:slrnacb9v4.5ud.randhol+abuse@kiuk0156.chembio.ntnu.no... > 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