writeb
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | writeb [2007/06/05 03:59] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | # $EPIC: writeb.txt, | ||
| + | ======Synopsis: | ||
| + | $__writeb__(< | ||
| + | |||
| + | ======Technical: | ||
| + | The [[writeb]] function will write binary data to an [[open]] file. The | ||
| + | < | ||
| + | you to convert data into ctcp-encoded format. | ||
| + | **will not** append a newline to < | ||
| + | you are responsible for putting in newlines wherever they belong. | ||
| + | |||
| + | As a special case, a window refnum can be given as the file descriptor | ||
| + | by prefixing the refnum with a w. This provides access to the logfile | ||
| + | for that window. The reserved window refnum 0 can be used to address | ||
| + | the current window' | ||
| + | addresses the global logfile. | ||
| + | |||
| + | ======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 | ||
| + | </ | ||
| + | |||
| + | ======Examples: | ||
| + | < | ||
| + | $writeb(7 blah blah) | ||
| + | $writeb(foo bar) " | ||
| + | $writeb(w1 this is a test) write to window refnum 1's logfile | ||
| + | $writeb(w0 this is a test) write to the current window' | ||
| + | $writeb(w-1 this is a test) write to the global logfile | ||
| + | </ | ||
writeb.txt · Last modified: 2007/06/05 03:59 by 127.0.0.1
