lua-users home
lua-l archive

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

Am 13.07.15 um 12:03 schrieb Luiz Henrique de Figueiredo:
>> I have several Lua source files which I compile to bytecode with a
>> single luac call as follows:
>> $ luac first.lua second.lua third.lua
>> Now when I execute the output using
>> $ lua luac.out
>> is it guaranteed that the order of execution will be the same as on the
>> luac command line, i.e. first.lua, then second.lua, then third.lua ?
> The order of execution is guaranteed. This is by design.

Fine, thanks for the confirmation.
> I wonder why you thought it might be otherwise.

I did _not_ think it what otherwise, I was just looking for confirmation
of the fact.  In the meantime I did what Dirk Laurie did and read the
luac source code.

> In the past, the command line interpreter lua accepted multiple files
> and ran them in the given order. luac did the same for consistency,
> and remained like that even when lua moved to running a single file.