aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-29 17:33:55 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2001-01-29 17:33:55 -0200
commit09def5da4440a5a91c2721f495bd9c3df1081874 (patch)
treeeefa692f90d6e43abe674f32387c7f55eca338d0
parent6b71a9cfe53040aa605f5d75c58a2124d03f8912 (diff)
downloadlua-09def5da4440a5a91c2721f495bd9c3df1081874.tar.gz
lua-09def5da4440a5a91c2721f495bd9c3df1081874.tar.bz2
lua-09def5da4440a5a91c2721f495bd9c3df1081874.zip
small corrections
-rw-r--r--manual.tex17
1 files changed, 10 insertions, 7 deletions
diff --git a/manual.tex b/manual.tex
index 068fd363..5d363702 100644
--- a/manual.tex
+++ b/manual.tex
@@ -1,4 +1,4 @@
1% $Id: manual.tex,v 1.47 2000/11/14 18:46:09 roberto Exp roberto $ 1% $Id: manual.tex,v 1.47 2000/12/28 17:25:45 roberto Exp roberto $
2 2
3\documentclass[11pt]{article} 3\documentclass[11pt]{article}
4\usepackage{fullpage} 4\usepackage{fullpage}
@@ -134,7 +134,7 @@ Waldemar Celes
134\tecgraf\ --- Computer Science Department --- PUC-Rio 134\tecgraf\ --- Computer Science Department --- PUC-Rio
135} 135}
136 136
137\date{{\small \tt\$Date: 2000/11/14 18:46:09 $ $}} 137\date{{\small \tt\$Date: 2000/12/28 17:25:45 $ $}}
138 138
139\maketitle 139\maketitle
140 140
@@ -1968,7 +1968,7 @@ and load it accordingly (see program \IndexVerb{luac}).
1968\verb|lua_dostring| executes only source code, 1968\verb|lua_dostring| executes only source code,
1969given in textual form. 1969given in textual form.
1970 1970
1971The third parameter to \verb|lua_dobuffer| 1971The fourth parameter to \verb|lua_dobuffer|
1972is the ``name of the chunk'', 1972is the ``name of the chunk'',
1973which is used in error messages and debug information. 1973which is used in error messages and debug information.
1974If \verb|name| is \verb|NULL|, 1974If \verb|name| is \verb|NULL|,
@@ -2170,7 +2170,7 @@ Here it is in~C:
2170 lua_pop(L, 1); /* remove `t' from the stack */ 2170 lua_pop(L, 1); /* remove `t' from the stack */
2171\end{verbatim} 2171\end{verbatim}
2172Notice that the code above is ``balanced'': 2172Notice that the code above is ``balanced'':
2173at its end ,the stack is back to its original configuration. 2173at its end, the stack is back to its original configuration.
2174This is considered good programming practice. 2174This is considered good programming practice.
2175 2175
2176\medskip 2176\medskip
@@ -2317,7 +2317,9 @@ thus creating a \IndexEmph{C~closure};
2317these values are passed to the function whenever it is called, 2317these values are passed to the function whenever it is called,
2318as ordinary arguments. 2318as ordinary arguments.
2319To associate upvalues to a C~function, 2319To associate upvalues to a C~function,
2320first these values should be pushed onto the stack. 2320first these values should be pushed onto the stack
2321(when there are multiple upvalues,
2322the first upvalue is pushed first).
2321Then the function 2323Then the function
2322\begin{verbatim} 2324\begin{verbatim}
2323 void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n); 2325 void lua_pushcclosure (lua_State *L, lua_CFunction fn, int n);
@@ -2634,7 +2636,8 @@ the table during the traversal.
2634 2636
2635\subsubsection*{\ff \T{print (e1, e2, ...)}}\DefLIB{print} 2637\subsubsection*{\ff \T{print (e1, e2, ...)}}\DefLIB{print}
2636Receives any number of arguments, 2638Receives any number of arguments,
2637and prints their values using the strings returned by \verb|tostring|. 2639and prints their values in \verb|stdout|,
2640using the strings returned by \verb|tostring|.
2638This function is not intended for formatted output, 2641This function is not intended for formatted output,
2639but only as a quick way to show a value, 2642but only as a quick way to show a value,
2640for instance for debugging. 2643for instance for debugging.
@@ -3311,7 +3314,7 @@ or \nil\ on end of file.
3311\subsubsection*{\ff \T{write ([filehandle, ] value1, ...)}}\DefLIB{write} 3314\subsubsection*{\ff \T{write ([filehandle, ] value1, ...)}}\DefLIB{write}
3312 3315
3313Writes the value of each of its arguments to 3316Writes the value of each of its arguments to
3314file \verb|_OUTPUT|, 3317filehandle \verb|_OUTPUT|,
3315or to \verb|filehandle| if this argument is given. 3318or to \verb|filehandle| if this argument is given.
3316The arguments must be strings or numbers. 3319The arguments must be strings or numbers.
3317To write other values, 3320To write other values,