diff options
Diffstat (limited to '')
| -rw-r--r-- | manual.tex | 17 |
1 files changed, 10 insertions, 7 deletions
| @@ -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, |
| 1969 | given in textual form. | 1969 | given in textual form. |
| 1970 | 1970 | ||
| 1971 | The third parameter to \verb|lua_dobuffer| | 1971 | The fourth parameter to \verb|lua_dobuffer| |
| 1972 | is the ``name of the chunk'', | 1972 | is the ``name of the chunk'', |
| 1973 | which is used in error messages and debug information. | 1973 | which is used in error messages and debug information. |
| 1974 | If \verb|name| is \verb|NULL|, | 1974 | If \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} |
| 2172 | Notice that the code above is ``balanced'': | 2172 | Notice that the code above is ``balanced'': |
| 2173 | at its end ,the stack is back to its original configuration. | 2173 | at its end, the stack is back to its original configuration. |
| 2174 | This is considered good programming practice. | 2174 | This is considered good programming practice. |
| 2175 | 2175 | ||
| 2176 | \medskip | 2176 | \medskip |
| @@ -2317,7 +2317,9 @@ thus creating a \IndexEmph{C~closure}; | |||
| 2317 | these values are passed to the function whenever it is called, | 2317 | these values are passed to the function whenever it is called, |
| 2318 | as ordinary arguments. | 2318 | as ordinary arguments. |
| 2319 | To associate upvalues to a C~function, | 2319 | To associate upvalues to a C~function, |
| 2320 | first these values should be pushed onto the stack. | 2320 | first these values should be pushed onto the stack |
| 2321 | (when there are multiple upvalues, | ||
| 2322 | the first upvalue is pushed first). | ||
| 2321 | Then the function | 2323 | Then 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} |
| 2636 | Receives any number of arguments, | 2638 | Receives any number of arguments, |
| 2637 | and prints their values using the strings returned by \verb|tostring|. | 2639 | and prints their values in \verb|stdout|, |
| 2640 | using the strings returned by \verb|tostring|. | ||
| 2638 | This function is not intended for formatted output, | 2641 | This function is not intended for formatted output, |
| 2639 | but only as a quick way to show a value, | 2642 | but only as a quick way to show a value, |
| 2640 | for instance for debugging. | 2643 | for 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 | ||
| 3313 | Writes the value of each of its arguments to | 3316 | Writes the value of each of its arguments to |
| 3314 | file \verb|_OUTPUT|, | 3317 | filehandle \verb|_OUTPUT|, |
| 3315 | or to \verb|filehandle| if this argument is given. | 3318 | or to \verb|filehandle| if this argument is given. |
| 3316 | The arguments must be strings or numbers. | 3319 | The arguments must be strings or numbers. |
| 3317 | To write other values, | 3320 | To write other values, |
