lua-users home
lua-l archive

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


Dirk:

On Wed, May 22, 2019 at 3:55 PM Dirk Laurie <dirk.laurie@gmail.com> wrote:
> Op Wo. 22 Mei 2019 om 15:41 het Coda Highland <chighland@gmail.com> geskryf:
...>> On Wed, May 22, 2019 at 4:15 AM Baozeng <sploving1@gmail.com> wrote:
> >> > I have a simple Lua file, for example, hello.lua. The contents of the file starts with a shebang
> >> This is not a simple lua file, shebangs are not valid lua.

> They're not in the language, but the manual does document that the
> standalone interpreter skips such a line at the top of a file. So they
> are in practice standard Lua unless you are using your own
> incompatible custom interpreter.

You are right. In fact, once you've pointed out I reread section 7,
and found it speaks of lines starting with "#", and the same
documented for loadfile. WHich explains why I din't find it in my
first manual / source reading as I was searching for '#!' ( did not
want to search for # in normal lua docs, too many #t find ).

Anyway, I was trying to point that he did not have a "simple lua
file", but a "lua script". Although I haven't tested what mechanism
require() and friends use...source seems to indicate loadfile.

Francisco Olarte.