lua-users home
lua-l archive

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



On Oct 2, 2018, at 4:12 PM, Egor Skriptunoff <egor.skriptunoff@gmail.com> wrote:

I'm using DOS command "cls" for clearing the screen :-)
http://lua-users.org/lists/lua-l/2018-07/msg00404.html

I just add a simple 2 lines patch to luaL_loadfile()
If a file start with @, Lua skip it all, to <ESC> (ascii 27)
Example:

@echo off
echo Running batch file test.bat
echo Loading Lua to run itself ...
Lua test.bat
exit/b

<ESC>
print("Lua code start here ...")

The patch made the Lua DLL code smaller, and Lua run faster. Weird ...
Batch file also look cleaner, without the hackish ::_:: --[[ stuff