I didn't realize I misread your question until Randy's response. He's right. Every platform I've run on (VAX, several flavors of unix, and Windows) has returned the path when I called Ada.Command_Line.Command_Name. But, I don't use the GNAT compiler, so I can't speak for it. The attached program shows some ways I've used it. Of course, the problem is it isn't guaranteed. It just happens to be the way everyone seems to have implemented it. 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