diff options
Diffstat (limited to 'manual.tex')
-rw-r--r-- | manual.tex | 51 |
1 files changed, 34 insertions, 17 deletions
@@ -1,4 +1,4 @@ | |||
1 | % $Id: manual.tex,v 1.9 1996/02/09 19:02:30 roberto Exp roberto $ | 1 | % $Id: manual.tex,v 1.10 1996/02/12 18:32:09 roberto Exp roberto $ |
2 | 2 | ||
3 | \documentstyle[A4,11pt,bnf]{article} | 3 | \documentstyle[A4,11pt,bnf]{article} |
4 | 4 | ||
@@ -13,11 +13,13 @@ | |||
13 | \newcommand{\Def}[1]{{\em #1}\index{#1}} | 13 | \newcommand{\Def}[1]{{\em #1}\index{#1}} |
14 | \newcommand{\Deffunc}[1]{\index{#1}} | 14 | \newcommand{\Deffunc}[1]{\index{#1}} |
15 | 15 | ||
16 | %\makeindex | 16 | \newcommand{\Version}{2.3} |
17 | |||
18 | \makeindex | ||
17 | 19 | ||
18 | \begin{document} | 20 | \begin{document} |
19 | 21 | ||
20 | \title{Reference Manual of the Programming Language Lua 2.2} | 22 | \title{Reference Manual of the Programming Language Lua \Version} |
21 | 23 | ||
22 | \author{% | 24 | \author{% |
23 | Roberto Ierusalimschy\quad | 25 | Roberto Ierusalimschy\quad |
@@ -29,10 +31,10 @@ Waldemar Celes Filho | |||
29 | \small\tt roberto,lhf,celes@icad.puc-rio.br | 31 | \small\tt roberto,lhf,celes@icad.puc-rio.br |
30 | \vspace{2.0ex}\\ | 32 | \vspace{2.0ex}\\ |
31 | %MCC 08/95 --- | 33 | %MCC 08/95 --- |
32 | Departamento de Inform\'atica --- PUC-Rio | 34 | \tecgraf\ --- Departamento de Inform\'atica --- PUC-Rio |
33 | } | 35 | } |
34 | 36 | ||
35 | \date{\small \verb$Date: 1996/02/09 19:02:30 $} | 37 | \date{\small \verb$Date: 1996/02/12 18:32:09 $} |
36 | 38 | ||
37 | \maketitle | 39 | \maketitle |
38 | 40 | ||
@@ -40,8 +42,8 @@ Departamento de Inform\'atica --- PUC-Rio | |||
40 | \noindent | 42 | \noindent |
41 | Lua is an extension programming language designed to be used | 43 | Lua is an extension programming language designed to be used |
42 | as a configuration language for any program that needs one. | 44 | as a configuration language for any program that needs one. |
43 | This document describes version 2.2 of the Lua programming language and the | 45 | This document describes Version \Version\ of the Lua programming language and |
44 | API that allows interaction between Lua programs and its host C program. | 46 | the API that allows interaction between Lua programs and its host C program. |
45 | It also presents some examples of using the main features of the system. | 47 | It also presents some examples of using the main features of the system. |
46 | \end{abstract} | 48 | \end{abstract} |
47 | 49 | ||
@@ -54,9 +56,9 @@ It also presents some examples of using the main features of the system. | |||
54 | Lua \'e uma linguagem de extens\~ao projetada para ser usada como | 56 | Lua \'e uma linguagem de extens\~ao projetada para ser usada como |
55 | linguagem de configura\c{c}\~ao em qualquer programa que precise de | 57 | linguagem de configura\c{c}\~ao em qualquer programa que precise de |
56 | uma. | 58 | uma. |
57 | Este documento descreve a vers\~ao 2.2 da linguagem de programa\c{c}\~ao Lua e a | 59 | Este documento descreve a vers\~ao \Version\ da linguagem de |
58 | Interface de Programa\c{c}\~ao que permite a intera\c{c}\~ao entre programas Lua | 60 | programa\c{c}\~ao Lua e a Interface de Programa\c{c}\~ao que permite |
59 | e o programa C hospedeiro. | 61 | a intera\c{c}\~ao entre programas Lua e o programa C hospedeiro. |
60 | O documento tamb\'em apresenta alguns exemplos de uso das principais | 62 | O documento tamb\'em apresenta alguns exemplos de uso das principais |
61 | ca\-racte\-r\'{\i}sticas do sistema. | 63 | ca\-racte\-r\'{\i}sticas do sistema. |
62 | \end{quotation} | 64 | \end{quotation} |
@@ -91,7 +93,7 @@ and provided as usual with no guarantees. | |||
91 | The implementation described in this manual is available | 93 | The implementation described in this manual is available |
92 | by anonymous ftp from | 94 | by anonymous ftp from |
93 | \begin{verbatim} | 95 | \begin{verbatim} |
94 | ftp.icad.puc-rio.br:/pub/lua/lua-2.2.tar.gz | 96 | ftp.icad.puc-rio.br:/pub/lua/lua.tar.gz |
95 | \end{verbatim} | 97 | \end{verbatim} |
96 | or by WWW (World Wide Web) from | 98 | or by WWW (World Wide Web) from |
97 | \begin{verbatim} | 99 | \begin{verbatim} |
@@ -1472,7 +1474,7 @@ is | |||
1472 | \begin{verbatim} | 1474 | \begin{verbatim} |
1473 | lua_Function lua_stackedfunction (int level); | 1475 | lua_Function lua_stackedfunction (int level); |
1474 | \end{verbatim} | 1476 | \end{verbatim} |
1475 | It returns a handle (\verb'lua_Function') to the {\em activation record} | 1477 | It returns a handle (\verb'lua_Function') to the {\em activation record\/} |
1476 | of the function executing at a given level. | 1478 | of the function executing at a given level. |
1477 | Level 0 is the current running function, | 1479 | Level 0 is the current running function, |
1478 | while level $n+1$ is the function that has called level $n$. | 1480 | while level $n+1$ is the function that has called level $n$. |
@@ -2001,7 +2003,7 @@ void remove_blanks (char *s) | |||
2001 | \section*{Acknowledgments} | 2003 | \section*{Acknowledgments} |
2002 | 2004 | ||
2003 | The authors would like to thank CENPES/PETROBR\'AS which, | 2005 | The authors would like to thank CENPES/PETROBR\'AS which, |
2004 | jointly with TeCGraf, used extensively early versions of | 2006 | jointly with \tecgraf, used extensively early versions of |
2005 | this system and gave valuable comments. | 2007 | this system and gave valuable comments. |
2006 | The authors would also like to thank Carlos Henrique Levy, | 2008 | The authors would also like to thank Carlos Henrique Levy, |
2007 | who found the name of the game. | 2009 | who found the name of the game. |
@@ -2018,10 +2020,24 @@ the previous public versions of Lua, | |||
2018 | some differences had to be introduced. | 2020 | some differences had to be introduced. |
2019 | Here is a list of all these differences. | 2021 | Here is a list of all these differences. |
2020 | 2022 | ||
2023 | \subsection*{Incompatibilities with \Index{version 2.2}} | ||
2024 | \begin{itemize} | ||
2025 | \item | ||
2026 | Functions \verb'date' and \verb'time' (from \verb'iolib') | ||
2027 | have been superseded by the new version of function \verb'date'. | ||
2028 | \item | ||
2029 | Function \verb'int2str' (from \verb'strlib') has been superseded by new | ||
2030 | function \verb'format', with parameter \verb'"%c"'. | ||
2031 | \item | ||
2032 | API function \verb'lua_pushliteral' now is just a macro to | ||
2033 | \verb'lua_pushstring'. | ||
2034 | Programmers are encouraged not to use this macro. | ||
2035 | \end{itemize} | ||
2036 | |||
2021 | \subsection*{Incompatibilities with \Index{version 2.1}} | 2037 | \subsection*{Incompatibilities with \Index{version 2.1}} |
2022 | \begin{itemize} | 2038 | \begin{itemize} |
2023 | \item | 2039 | \item |
2024 | The function {\tt type} now returns the string {\tt function} | 2040 | The function \verb'type' now returns the string \verb'"function"' |
2025 | both for C and Lua functions. | 2041 | both for C and Lua functions. |
2026 | Because Lua functions and C functions are compatible, | 2042 | Because Lua functions and C functions are compatible, |
2027 | this behavior is usually more useful. | 2043 | this behavior is usually more useful. |
@@ -2075,12 +2091,13 @@ Special care should be taken with macros like | |||
2075 | \verb'lua_getindexed' and \verb'lua_getfield'. | 2091 | \verb'lua_getindexed' and \verb'lua_getfield'. |
2076 | \end{itemize} | 2092 | \end{itemize} |
2077 | 2093 | ||
2078 | \pagebreak | ||
2079 | \tableofcontents | ||
2080 | \newcommand{\indexentry}[2]{\item {#1} #2} | 2094 | \newcommand{\indexentry}[2]{\item {#1} #2} |
2081 | %\catcode`\_=12 | 2095 | %\catcode`\_=12 |
2082 | \begin{theindex} | 2096 | \begin{theindex} |
2083 | \input{manual.idx} | 2097 | \input{manual.id} |
2084 | \end{theindex} | 2098 | \end{theindex} |
2085 | 2099 | ||
2100 | \pagebreak | ||
2101 | \tableofcontents | ||
2102 | |||
2086 | \end{document} | 2103 | \end{document} |