read
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | read [2007/06/05 03:56] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | # $EPIC: read.txt,v 1.3 2007/06/05 03:56:39 jnelson Exp $ | ||
| + | ======Synopsis: | ||
| + | $__read__(< | ||
| + | |||
| + | ======Technical: | ||
| + | This function reads data from an [[open]] file. The value <fd> must have | ||
| + | been previously returned by the [[open]] function. | ||
| + | it will read and return that number of bytes from the file. If no < | ||
| + | is given, it will read and return the next line of text from the file. | ||
| + | |||
| + | If < | ||
| + | will be encoded with the CTCP transform, which guarantees you can send | ||
| + | the string over irc, or assign it to a variable. | ||
| + | convert this data into another format. | ||
| + | |||
| + | The function will return the empty string if <fd> is not a value previously | ||
| + | returned by [[open]] or if the file has reached EOF, or if there was an | ||
| + | error. | ||
| + | these possibilities. | ||
| + | |||
| + | ======Returns: | ||
| + | Data read from file, or nothing on error. | ||
| + | CTCP encoded. | ||
| + | |||
| + | ======Examples: | ||
| + | < | ||
| + | $read(4) | ||
| + | $read(4 30) returns next 30 bytes from fd 4 | ||
| + | </ | ||
read.txt · Last modified: 2007/06/05 03:56 by 127.0.0.1
