diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-11-01 16:02:53 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-11-01 16:02:53 -0200 |
commit | 243b3a1a47b30549198f874a497547b5656912c1 (patch) | |
tree | e5db6a1b303468525d46ba78fd73d94a3fef73fa | |
parent | 389e808c60865e66061328448e26fe8bc60c4605 (diff) | |
download | lua-243b3a1a47b30549198f874a497547b5656912c1.tar.gz lua-243b3a1a47b30549198f874a497547b5656912c1.tar.bz2 lua-243b3a1a47b30549198f874a497547b5656912c1.zip |
i/o functions return an error message
-rw-r--r-- | manual.tex | 18 |
1 files changed, 14 insertions, 4 deletions
@@ -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, | |||
1486 | it closes the current input file, | 1486 | it closes the current input file, |
1487 | and restores \verb'stdin' as the current input file. | 1487 | and restores \verb'stdin' as the current input file. |
1488 | 1488 | ||
1489 | If this function fails, it returns \nil. | 1489 | If this function fails, it returns \nil, |
1490 | plus 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'|', |
1492 | then a \Index{piped input} is open, via function \IndexVerb{popen}. | 1493 | then a \Index{piped input} is open, via function \IndexVerb{popen}. |
@@ -1508,7 +1509,8 @@ this function closes the current output file, | |||
1508 | and restores \verb'stdout' as the current output file. | 1509 | and restores \verb'stdout' as the current output file. |
1509 | \index{closing a file} | 1510 | \index{closing a file} |
1510 | 1511 | ||
1511 | If this function fails, it returns \nil. | 1512 | If this function fails, it returns \nil, |
1513 | plus 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'|', |
1514 | then a \Index{piped output} is open, via function \IndexVerb{popen}. | 1516 | then a \Index{piped output} is open, via function \IndexVerb{popen}. |
@@ -1521,14 +1523,20 @@ It returns the file handle, | |||
1521 | or \nil\ in case of error. | 1523 | or \nil\ in case of error. |
1522 | Unlike the \verb'writeto' operation, | 1524 | Unlike the \verb'writeto' operation, |
1523 | this function does not erase any previous content of the file. | 1525 | this function does not erase any previous content of the file. |
1526 | If this function fails, it returns \nil, | ||
1527 | plus 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 | ||
1527 | This function deletes the file with the given name. | 1531 | This function deletes the file with the given name. |
1532 | If this function fails, it returns \nil, | ||
1533 | plus 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 | ||
1531 | This function renames file \verb'name1' to \verb'name2'. | 1537 | This function renames file \verb'name1' to \verb'name2'. |
1538 | If this function fails, it returns \nil, | ||
1539 | plus 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. | |||
1588 | This function writes the value of each of its arguments to the | 1596 | This function writes the value of each of its arguments to the |
1589 | current output file. | 1597 | current output file. |
1590 | The arguments must be strings or numbers. | 1598 | The arguments must be strings or numbers. |
1599 | If this function fails, it returns \nil, | ||
1600 | plus 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 | ||