Strings as function names (again)

Steve Summit scs at adam.mit.edu
Sun Feb 24 14:53:59 AEST 1991


Various people write:
>> |> >>One is that you have to tell it a path to the executable file, and
>> |> >>that is not in general available for the currently-executing process.
>> |> >Sure? How about argv[0] ?
>>  [semiportable code for making best guess at program's
>>  executable from argv[0] and $PATH]
>	Your solution is interesting, but I think that here is where you
>miss the point.  C runs on many many many operating systems and platforms.
>I have no doubt that your code will run on a sun, or most unix systems. On
>the other hand, I doubt that it will run on...
>	The answer is, NO - there is no STANDARD way of knowing the name of
>the currently exicuting file.

I think the person who posted the code realized that.  I KNOW
that this topic has been discussed to death countless times, and
that all of these arguments have been brought up before, which is
why they are summarized in the comp.lang.c frequently-asked
questions list.  Please read that list before posting anything
else on this subject, and make sure that you have something new
to say.

                                            Steve Summit
                                            scs at adam.mit.edu



More information about the Comp.lang.c mailing list