Sei sulla pagina 1di 4

Manual de Referência de Lua 5.

1
Essa é uma tradução para o português do manual de referência de Lua, que é a definição oficial da linguagem Lua. Para uma
introdução completa à programação em Lua, veja o livro Programming in Lua.
A versão original em inglês também está disponível como livro:
Lua 5.1 Reference Manual
by R. Ierusalimschy, L. H. de Figueiredo, W. Celes
Lua.org, August 2006
ISBN 85-903798-3-3

Comprando esse livro você ajuda a apoiar o projeto Lua.


A tradução para o português foi feita por Sérgio Queiroz de Medeiros com revisão de Roberto Ierusalimschy.
início · conteúdo · índice · english · español
Copyright © 2007–2008 Lua.org, PUC-Rio. Disponível livremente nos termos da licença de Lua.

Conteúdo
1 - Introdução
2 - A Linguagem
2.1 - Convenções Léxicas
2.2 - Valores e Tipos
2.2.1 - Coerção
2.3 - Variáveis
2.4 - Comandos
2.4.1 - Trechos
2.4.2 - Blocos
2.4.3 - Atribuição
2.4.4 - Estruturas de Controle
2.4.5 - Comando for
2.4.6 - Chamadas de Função como Comandos
2.4.7 - Declarações Locais
2.5 - Expressões
2.5.1 - Operadores Aritméticos
2.5.2 - Operadores Relacionais
2.5.3 - Operadores Lógicos
2.5.4 - Concatenação
2.5.5 - O Operador de Tamanho
2.5.6 - Precedência
2.5.7 - Construtores de Tabelas
2.5.8 - Chamadas de Função
2.5.9 - Definições de Funções
2.6 - Regras de Visibilidade
2.7 - Tratamento de Erros
2.8 - Meta-tabelas
2.9 - Ambientes
2.10 - Coleta de Lixo
2.10.1 - Meta-métodos de Coleta de Lixo
2.10.2 - Tabelas Fracas
2.11 - Co-rotinas
3 - A Interface de Programação da Aplicação (API)
3.1 - A Pilha
3.2 - Tamanho da Pilha
3.3 - Pseudo-Índices
3.4 - Fechos C
3.5 - Registro

converted by Web2PDFConvert.com
3.6 - Tratamento de Erros em C
3.7 - Funções e Tipos
3.8 - A Interface de Depuração
4 - A Biblioteca Auxiliar
4.1 - Funções e Tipos
5 - Bibliotecas Padrão
5.1 - Funções Básicas
5.2 - Manipulação de Co-rotinas
5.3 - Módulos
5.4 - Manipulação de Cadeias de Caracteres
5.4.1 - Padrões
5.5 - Manipulação de Tabelas
5.6 - Funções Matemáticas
5.7 - Facilidades de Entrada e Saída
5.8 - Facilidades do Sistema Operacional
5.9 - A Biblioteca de Depuração
6 - O Interpretador de Linha de Comando Lua
7 - Incompatibilidades com a Versão Anterior
7.1 - Mudanças na Linguagem
7.2 - Mudanças nas Bibliotecas
7.3 - Mudanças na API
8 - A Sintaxe Completa de Lua

Índice
Funções Lua API C biblioteca auxiliar
_G file:close lua_Alloc luaL_Buffer
_VERSION file:flush lua_CFunction luaL_Reg
file:lines lua_Debug
assert file:read lua_Hook luaL_addchar
collectgarbage file:seek lua_Integer luaL_addlstring
dofile file:setvbuf lua_Number luaL_addsize
error file:write lua_Reader luaL_addstring
getfenv lua_State luaL_addvalue
getmetatable io.close lua_Writer luaL_argcheck
ipairs io.flush luaL_argerror
load io.input lua_atpanic luaL_buffinit
loadfile io.lines lua_call luaL_callmeta
loadstring io.open lua_checkstack luaL_checkany
module io.output lua_close luaL_checkint
next io.popen lua_concat luaL_checkinteger
pairs io.read lua_cpcall luaL_checklong
pcall io.stderr lua_createtable luaL_checklstring
print io.stdin lua_dump luaL_checknumber
rawequal io.stdout lua_equal luaL_checkoption
rawget io.tmpfile lua_error luaL_checkstack
rawset io.type lua_gc luaL_checkstring
require io.write lua_getallocf luaL_checktype
select lua_getfenv luaL_checkudata
setfenv math.abs lua_getfield luaL_dofile
setmetatable math.acos lua_getglobal luaL_dostring
tonumber math.asin lua_gethook luaL_error
tostring math.atan lua_gethookcount luaL_getmetafield
type math.atan2 lua_gethookmask luaL_getmetatable
unpack math.ceil lua_getinfo luaL_gsub
xpcall math.cos lua_getlocal luaL_loadbuffer
math.cosh lua_getmetatable luaL_loadfile
coroutine.create math.deg lua_getstack luaL_loadstring
coroutine.resume math.exp lua_gettable luaL_newmetatable
coroutine.running math.floor lua_gettop luaL_newstate
coroutine.status math.fmod lua_getupvalue luaL_openlibs
coroutine.wrap math.frexp lua_insert luaL_optint
coroutine.yield math.huge lua_isboolean luaL_optinteger
math.ldexp lua_iscfunction luaL_optlong
debug.debug math.log

converted by Web2PDFConvert.com
debug.debug math.log lua_isfunction luaL_optlstring
debug.getfenv math.log10 lua_islightuserdata luaL_optnumber
debug.gethook math.max lua_isnil luaL_optstring
debug.getinfo math.min lua_isnone luaL_prepbuffer
debug.getlocal math.modf lua_isnoneornil luaL_pushresult
debug.getmetatable math.pi lua_isnumber luaL_ref
debug.getregistry math.pow lua_isstring luaL_register
debug.getupvalue math.rad lua_istable luaL_typename
debug.setfenv math.random lua_isthread luaL_typerror
debug.sethook math.randomseed lua_isuserdata luaL_unref
debug.setlocal math.sin lua_lessthan luaL_where
debug.setmetatable math.sinh lua_load
debug.setupvalue math.sqrt lua_newstate
debug.traceback math.tan lua_newtable
math.tanh lua_newthread
lua_newuserdata
os.clock lua_next
os.date lua_objlen
os.difftime lua_pcall
os.execute lua_pop
os.exit lua_pushboolean
os.getenv lua_pushcclosure
os.remove lua_pushcfunction
os.rename lua_pushfstring
os.setlocale lua_pushinteger
os.time lua_pushlightuserdata
os.tmpname lua_pushliteral
lua_pushlstring
package.cpath
lua_pushnil
package.loaded
lua_pushnumber
package.loaders
lua_pushstring
package.loadlib
lua_pushthread
package.path
lua_pushvalue
package.preload lua_pushvfstring
package.seeall
lua_rawequal
string.byte lua_rawget
string.char lua_rawgeti
string.dump lua_rawset
string.find lua_rawseti
string.format lua_register
string.gmatch lua_remove
string.gsub lua_replace
string.len lua_resume
string.lower lua_setallocf
string.match lua_setfenv
string.rep lua_setfield
string.reverse lua_setglobal
string.sub lua_sethook
string.upper lua_setlocal
lua_setmetatable
table.concat lua_settable
table.insert lua_settop
table.maxn lua_setupvalue
table.remove lua_status
table.sort lua_toboolean
lua_tocfunction
lua_tointeger
lua_tolstring
lua_tonumber
lua_topointer
lua_tostring
lua_tothread
lua_touserdata
lua_type
lua_typename
lua_upvalueindex
lua_xmove
lua_yield
Last update: Tue Jan 28 13:55:50 BRST 2014

converted by Web2PDFConvert.com
converted by Web2PDFConvert.com

Potrebbero piacerti anche