附录一 Lua 5.1 程序接口

Lua functions

  1. _G
  2. _VERSION
  3. assert
  4. collectgarbage
  5. dofile
  6. error
  7. getfenv
  8. getmetatable
  9. ipairs
  10. load
  11. loadfile
  12. loadstring
  13. module
  14. next
  15. pairs
  16. pcall
  17. print
  18. rawequal
  19. rawget
  20. rawset
  21. require
  22. select
  23. setfenv
  24. setmetatable
  25. tonumber
  26. tostring
  27. type
  28. unpack
  29. xpcall
  30. coroutine.create
  31. coroutine.resume
  32. coroutine.running
  33. coroutine.status
  34. coroutine.wrap
  35. coroutine.yield
  36. debug.debug
  37. debug.getfenv
  38. debug.gethook
  39. debug.getinfo
  40. debug.getlocal
  41. debug.getmetatable
  42. debug.getregistry
  43. debug.getupvalue
  44. debug.setfenv
  45. debug.sethook
  46. debug.setlocal
  47. debug.setmetatable
  48. debug.setupvalue
  49. debug.traceback
  50. file:close
  51. file:flush
  52. file:lines
  53. file:read
  54. file:seek
  55. file:setvbuf
  56. file:write
  57. io.close
  58. io.flush
  59. io.input
  60. io.lines
  61. io.open
  62. io.output
  63. io.popen
  64. io.read
  65. io.stderr
  66. io.stdin
  67. io.stdout
  68. io.tmpfile
  69. io.type
  70. io.write
  71. math.abs
  72. math.acos
  73. math.asin
  74. math.atan
  75. math.atan2
  76. math.ceil
  77. math.cos
  78. math.cosh
  79. math.deg
  80. math.exp
  81. math.floor
  82. math.fmod
  83. math.frexp
  84. math.huge
  85. math.ldexp
  86. math.log
  87. math.log10
  88. math.max
  89. math.min
  90. math.modf
  91. math.pi
  92. math.pow
  93. math.rad
  94. math.random
  95. math.randomseed
  96. math.sin
  97. math.sinh
  98. math.sqrt
  99. math.tan
  100. math.tanh
  101. os.clock
  102. os.date
  103. os.difftime
  104. os.execute
  105. os.exit
  106. os.getenv
  107. os.remove
  108. os.rename
  109. os.setlocale
  110. os.time
  111. os.tmpname
  112. package.cpath
  113. package.loaded
  114. package.loaders
  115. package.loadlib
  116. package.path
  117. package.preload
  118. package.seeall
  119. string.byte
  120. string.char
  121. string.dump
  122. string.find
  123. string.format
  124. string.gmatch
  125. string.gsub
  126. string.len
  127. string.lower
  128. string.match
  129. string.rep
  130. string.reverse
  131. string.sub
  132. string.upper
  133. table.concat
  134. table.insert
  135. table.maxn
  136. table.remove
  137. table.sort

C API

  1. lua_Alloc
  2. lua_CFunction
  3. lua_Debug
  4. lua_Hook
  5. lua_Integer
  6. lua_Number
  7. lua_Reader
  8. lua_State
  9. lua_Writer
  10. lua_atpanic
  11. lua_call
  12. lua_checkstack
  13. lua_close
  14. lua_concat
  15. lua_cpcall
  16. lua_createtable
  17. lua_dump
  18. lua_equal
  19. lua_error
  20. lua_gc
  21. lua_getallocf
  22. lua_getfenv
  23. lua_getfield
  24. lua_getglobal
  25. lua_gethook
  26. lua_gethookcount
  27. lua_gethookmask
  28. lua_getinfo
  29. lua_getlocal
  30. lua_getmetatable
  31. lua_getstack
  32. lua_gettable
  33. lua_gettop
  34. lua_getupvalue
  35. lua_insert
  36. lua_isboolean
  37. lua_iscfunction
  38. lua_isfunction
  39. lua_islightuserdata
  40. lua_isnil
  41. lua_isnone
  42. lua_isnoneornil
  43. lua_isnumber
  44. lua_isstring
  45. lua_istable
  46. lua_isthread
  47. lua_isuserdata
  48. lua_lessthan
  49. lua_load
  50. lua_newstate
  51. lua_newtable
  52. lua_newthread
  53. lua_newuserdata
  54. lua_next
  55. lua_objlen
  56. lua_pcall
  57. lua_pop
  58. lua_pushboolean
  59. lua_pushcclosure
  60. lua_pushcfunction
  61. lua_pushfstring
  62. lua_pushinteger
  63. lua_pushlightuserdata
  64. lua_pushliteral
  65. lua_pushlstring
  66. lua_pushnil
  67. lua_pushnumber
  68. lua_pushstring
  69. lua_pushthread
  70. lua_pushvalue
  71. lua_pushvfstring
  72. lua_rawequal
  73. lua_rawget
  74. lua_rawgeti
  75. lua_rawset
  76. lua_rawseti
  77. lua_register
  78. lua_remove
  79. lua_replace
  80. lua_resume
  81. lua_setallocf
  82. lua_setfenv
  83. lua_setfield
  84. lua_setglobal
  85. lua_sethook
  86. lua_setlocal
  87. lua_setmetatable
  88. lua_settable
  89. lua_settop
  90. lua_setupvalue
  91. lua_status
  92. lua_toboolean
  93. lua_tocfunction
  94. lua_tointeger
  95. lua_tolstring
  96. lua_tonumber
  97. lua_topointer
  98. lua_tostring
  99. lua_tothread
  100. lua_touserdata
  101. lua_type
  102. lua_typename
  103. lua_upvalueindex
  104. lua_xmove
  105. lua_yield

auxiliary library

  1. luaL_Buffer
  2. luaL_Reg
  3. luaL_addchar
  4. luaL_addlstring
  5. luaL_addsize
  6. luaL_addstring
  7. luaL_addvalue
  8. luaL_argcheck
  9. luaL_argerror
  10. luaL_buffinit
  11. luaL_callmeta
  12. luaL_checkany
  13. luaL_checkint
  14. luaL_checkinteger
  15. luaL_checklong
  16. luaL_checklstring
  17. luaL_checknumber
  18. luaL_checkoption
  19. luaL_checkstack
  20. luaL_checkstring
  21. luaL_checktype
  22. luaL_checkudata
  23. luaL_dofile
  24. luaL_dostring
  25. luaL_error
  26. luaL_getmetafield
  27. luaL_getmetatable
  28. luaL_gsub
  29. luaL_loadbuffer
  30. luaL_loadfile
  31. luaL_loadstring
  32. luaL_newmetatable
  33. luaL_newstate
  34. luaL_openlibs
  35. luaL_optint
  36. luaL_optinteger
  37. luaL_optlong
  38. luaL_optlstring
  39. luaL_optnumber
  40. luaL_optstring
  41. luaL_prepbuffer
  42. luaL_pushresult
  43. luaL_ref
  44. luaL_register
  45. luaL_typename
  46. luaL_typerror
  47. luaL_unref
  48. luaL_where

导航