diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-06-19 15:47:06 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1998-06-19 15:47:06 -0300 |
| commit | df0df08bc537d4f2c13446fee20f8a4335f9d9d2 (patch) | |
| tree | 9ddf500c4019037c2a2b80f9d94709c28258f30a /manual.tex | |
| parent | 9618aaf07d0d82ccbac91db22cb42451ec17d7ed (diff) | |
| download | lua-df0df08bc537d4f2c13446fee20f8a4335f9d9d2.tar.gz lua-df0df08bc537d4f2c13446fee20f8a4335f9d9d2.tar.bz2 lua-df0df08bc537d4f2c13446fee20f8a4335f9d9d2.zip | |
"dostring" accepts chunk name.
Diffstat (limited to 'manual.tex')
| -rw-r--r-- | manual.tex | 11 |
1 files changed, 8 insertions, 3 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | % $Id: manual.tex,v 1.14 1998/06/15 21:34:14 roberto Exp roberto $ | 1 | % $Id: manual.tex,v 1.15 1998/06/18 17:36:27 roberto Exp roberto $ |
| 2 | 2 | ||
| 3 | \documentclass[11pt]{article} | 3 | \documentclass[11pt]{article} |
| 4 | \usepackage{fullpage,bnf} | 4 | \usepackage{fullpage,bnf} |
| @@ -39,7 +39,7 @@ Waldemar Celes | |||
| 39 | \tecgraf\ --- Computer Science Department --- PUC-Rio | 39 | \tecgraf\ --- Computer Science Department --- PUC-Rio |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | %\date{\small \verb$Date: 1998/06/15 21:34:14 $} | 42 | %\date{\small \verb$Date: 1998/06/18 17:36:27 $} |
| 43 | 43 | ||
| 44 | \maketitle | 44 | \maketitle |
| 45 | 45 | ||
| @@ -1602,6 +1602,8 @@ Function \verb|lua_dostring| executes only source code. | |||
| 1602 | The third parameter to \verb|lua_dobuffer| (\verb|name|) | 1602 | The third parameter to \verb|lua_dobuffer| (\verb|name|) |
| 1603 | is the ``name of the chunk'', | 1603 | is the ``name of the chunk'', |
| 1604 | used in error messages and debug information. | 1604 | used in error messages and debug information. |
| 1605 | If \verb|name| is \verb|NULL|, | ||
| 1606 | Lua gives a default name to the chunk. | ||
| 1605 | In files this name is the file name, | 1607 | In files this name is the file name, |
| 1606 | and \verb|lua_dostring| uses a small prefix | 1608 | and \verb|lua_dostring| uses a small prefix |
| 1607 | of the string as the chunk name. | 1609 | of the string as the chunk name. |
| @@ -1949,12 +1951,15 @@ or a non \nil\ value if the chunk returns no values. | |||
| 1949 | It issues an error when called with a non string argument. | 1951 | It issues an error when called with a non string argument. |
| 1950 | \verb|dofile| is equivalent to the API function \verb|lua_dofile|. | 1952 | \verb|dofile| is equivalent to the API function \verb|lua_dofile|. |
| 1951 | 1953 | ||
| 1952 | \subsubsection*{\ff \T{dostring (string)}}\Deffunc{dostring} | 1954 | \subsubsection*{\ff \T{dostring (string [, chunkname])}}\Deffunc{dostring} |
| 1953 | This function executes a given string as a Lua chunk. | 1955 | This function executes a given string as a Lua chunk. |
| 1954 | If there is any error executing the string, | 1956 | If there is any error executing the string, |
| 1955 | \verb|dostring| returns \nil. | 1957 | \verb|dostring| returns \nil. |
| 1956 | Otherwise, it returns the values returned by the chunk, | 1958 | Otherwise, it returns the values returned by the chunk, |
| 1957 | or a non \nil\ value if the chunk returns no values. | 1959 | or a non \nil\ value if the chunk returns no values. |
| 1960 | An optional second parameter (\verb|chunkname|) | ||
| 1961 | is the ``name of the chunk'', | ||
| 1962 | used in error messages and debug information. | ||
| 1958 | \verb|dostring| is equivalent to the API function \verb|lua_dostring|. | 1963 | \verb|dostring| is equivalent to the API function \verb|lua_dostring|. |
| 1959 | 1964 | ||
| 1960 | \subsubsection*{\ff \T{newtag ()}}\Deffunc{newtag}\label{pdf-newtag} | 1965 | \subsubsection*{\ff \T{newtag ()}}\Deffunc{newtag}\label{pdf-newtag} |
