lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Sam Roberts <vieuxtech@gmail.com> writes:
>  The fourth line is a string that, in a path in Windows, is replaced
> by the executable's directory. Default is '!'.
>
> The executable is the lua.exe, or the script.lua?
>
> And why don't posix users get this?

I don't think it's possible in a portable way to locate the executable's
directory...

[Looking at argv[0] and possibly searching getenv("PATH") _often_ works,
but is not guaranteed.]

-miles

-- 
Fast, small, soon; pick any 2.