Re: Euphoria environment variables (was: quick cgi question)
- Posted by Ed Davis <ed_davis2 at yahoo.com> Apr 02, 2006
- 483 views
Juergen Luethje wrote: >The interpreter/translator just had to look for a file "Euphoria.ini" >in the same directory where it is located itself. 100% >cross-platform, and no hassle with environment variables any more. >What do you think? But is this cross-platform? Under DOS and Windows, C compilers use argv[0] to get the complete path to the program. However, argv[0] isn't populated the same way under Linux. argv[0] appears to contain the command string that was typed to start the executable. This is on RedHat, SlackWare, and Knoppix. I assume the other distributions are the same? I don't know about FreeBSD, but I assume this is a Unix thing. So, how does a program find the complete path to itself on Linux? Finally, I agree, it would be nice to not require environment variables!