Skip to content

Latest commit

 

History

History
 
 

07LuaStandAlone

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Table of Contents generated with DocToc

7. Lua宿主程序

  • Lua虽然被设计为一个扩展语言,用来嵌入宿主C程序中。但也可以作为一个独立的语言。
  • Lua源码中提供了lua程序作为解释器,调用lua核心库。
  • 使用:
lua [options] [script [args]]

options:
-e stat: execute string stat;
-i: enter interactive mode after running script;
-l mod: "require" mod and assign the result to global mod;
-l g=mod: "require" mod and assign the result to global g;
-v: print version information;
-E: ignore environment variables;
-W: turn warnings on;
--: stop handling options;
-: execute stdin as a file and stop handling options.