Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rochester!ken From: ken@rochester.ARPA (Ken Yap) Newsgroups: comp.lang.fortran Subject: Re: Can a subroutine find the name of the calling routine? Message-ID: <27481@rochester.ARPA> Date: Fri, 1-May-87 23:13:46 EDT Article-I.D.: rocheste.27481 Posted: Fri May 1 23:13:46 1987 Date-Received: Sun, 3-May-87 03:02:31 EDT References: <13160003@acf4.UUCP> <702@dayton.UUCP> Reply-To: ken@rochester.UUCP (Ken Yap) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 18 If you want to do this just for the purposes of tracing calls and you don't want to go around mucking with machine dependent stacks, you could do it with a preprocessor that inserts two extra arguments in front of every call. call foobar(1, 3.0, 4.0) becomes call foobar('parent', 3, 1, 3.0, 4.0) and the subroutine declaration has to be changed too, of course. Of course, don't do this to library routines or intrinsics. I don't have any idea how much work this is. Have fun. Ken