aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-11-01 16:02:53 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1996-11-01 16:02:53 -0200
commit243b3a1a47b30549198f874a497547b5656912c1 (patch)
treee5db6a1b303468525d46ba78fd73d94a3fef73fa
parent389e808c60865e66061328448e26fe8bc60c4605 (diff)
downloadlua-243b3a1a47b30549198f874a497547b5656912c1.tar.gz
lua-243b3a1a47b30549198f874a497547b5656912c1.tar.bz2
lua-243b3a1a47b30549198f874a497547b5656912c1.zip
i/o functions return an error message
-rw-r--r--manual.tex18
1 files changed, 14 insertions, 4 deletions
diff --git a/manual.tex b/manual.tex
index aa42c255..f068b714 100644
--- a/manual.tex
+++ b/manual.tex
@@ -1,4 +1,4 @@
1% $Id: manual.tex,v 1.19 1996/08/28 20:46:26 roberto Exp roberto $ 1% $Id: manual.tex,v 1.20 1996/11/01 17:02:10 roberto Exp roberto $
2 2
3\documentstyle[fullpage,11pt,bnf]{article} 3\documentstyle[fullpage,11pt,bnf]{article}
4 4
@@ -36,7 +36,7 @@ Waldemar Celes
36\tecgraf\ --- Departamento de Inform\'atica --- PUC-Rio 36\tecgraf\ --- Departamento de Inform\'atica --- PUC-Rio
37} 37}
38 38
39\date{\small \verb$Date: 1996/08/28 20:46:26 $} 39\date{\small \verb$Date: 1996/11/01 17:02:10 $}
40 40
41\maketitle 41\maketitle
42 42
@@ -1486,7 +1486,8 @@ When called without parameters,
1486it closes the current input file, 1486it closes the current input file,
1487and restores \verb'stdin' as the current input file. 1487and restores \verb'stdin' as the current input file.
1488 1488
1489If this function fails, it returns \nil. 1489If this function fails, it returns \nil,
1490plus a string describing the error.
1490 1491
1491{\em System dependent:} if \verb'filename' starts with a \verb'|', 1492{\em System dependent:} if \verb'filename' starts with a \verb'|',
1492then a \Index{piped input} is open, via function \IndexVerb{popen}. 1493then a \Index{piped input} is open, via function \IndexVerb{popen}.
@@ -1508,7 +1509,8 @@ this function closes the current output file,
1508and restores \verb'stdout' as the current output file. 1509and restores \verb'stdout' as the current output file.
1509\index{closing a file} 1510\index{closing a file}
1510 1511
1511If this function fails, it returns \nil. 1512If this function fails, it returns \nil,
1513plus a string describing the error.
1512 1514
1513{\em System dependent:} if \verb'filename' starts with a \verb'|', 1515{\em System dependent:} if \verb'filename' starts with a \verb'|',
1514then a \Index{piped output} is open, via function \IndexVerb{popen}. 1516then a \Index{piped output} is open, via function \IndexVerb{popen}.
@@ -1521,14 +1523,20 @@ It returns the file handle,
1521or \nil\ in case of error. 1523or \nil\ in case of error.
1522Unlike the \verb'writeto' operation, 1524Unlike the \verb'writeto' operation,
1523this function does not erase any previous content of the file. 1525this function does not erase any previous content of the file.
1526If this function fails, it returns \nil,
1527plus a string describing the error.
1524 1528
1525\subsubsection*{\ff{\tt remove (filename)}}\Deffunc{remove} 1529\subsubsection*{\ff{\tt remove (filename)}}\Deffunc{remove}
1526 1530
1527This function deletes the file with the given name. 1531This function deletes the file with the given name.
1532If this function fails, it returns \nil,
1533plus a string describing the error.
1528 1534
1529\subsubsection*{\ff{\tt rename (name1, name2)}}\Deffunc{rename} 1535\subsubsection*{\ff{\tt rename (name1, name2)}}\Deffunc{rename}
1530 1536
1531This function renames file \verb'name1' to \verb'name2'. 1537This function renames file \verb'name1' to \verb'name2'.
1538If this function fails, it returns \nil,
1539plus a string describing the error.
1532 1540
1533\subsubsection*{\ff{\tt tmpname ()}}\Deffunc{tmpname} 1541\subsubsection*{\ff{\tt tmpname ()}}\Deffunc{tmpname}
1534 1542
@@ -1588,6 +1596,8 @@ or \nil\ if the next characters do not conform to an integer format.
1588This function writes the value of each of its arguments to the 1596This function writes the value of each of its arguments to the
1589current output file. 1597current output file.
1590The arguments must be strings or numbers. 1598The arguments must be strings or numbers.
1599If this function fails, it returns \nil,
1600plus a string describing the error.
1591 1601
1592\subsubsection*{\ff{\tt date ([format])}}\Deffunc{date} 1602\subsubsection*{\ff{\tt date ([format])}}\Deffunc{date}
1593 1603