Initial import of the ircii-pana-1.1-final source tree.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/tags/ircii-pana-1.1-final@1 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
28
bitchx-docs/6_Functions/writeb
Normal file
28
bitchx-docs/6_Functions/writeb
Normal file
@@ -0,0 +1,28 @@
|
||||
Synopsis:
|
||||
$write(<fd> <text>)
|
||||
$writeb(<fd> <text>)
|
||||
|
||||
Technical:
|
||||
This function writes the given text to the given file descriptor. A
|
||||
newline is automatically appended to the text. The $writeb() variant
|
||||
does the same thing, except the newline is not automatically appended.
|
||||
|
||||
Practical:
|
||||
This function is useful for saving information to an external file. It
|
||||
is most often used in scripts for saving configuration settings and the
|
||||
like. The $writeb() function is useful for writing to binary files, or
|
||||
for writing lines to a file incrementally.
|
||||
|
||||
Returns:
|
||||
-1 if file descriptor does not exist
|
||||
> -1 number of bytes written (text length plus newline, if applicable)
|
||||
|
||||
Examples:
|
||||
$write(7 blah blah) writes "blah blah" plus NL to fd "7"
|
||||
$write(foo bar) "foo" not an fd, writes nothing
|
||||
$writeb(7 blah blah) writes "blah blah" to fd "7"
|
||||
$writeb(foo bar) "foo" not an fd, writes nothing
|
||||
|
||||
See Also:
|
||||
close(6); open(6); read(6)
|
||||
|
||||
Reference in New Issue
Block a user