This shows you the differences between two versions of the page.
— |
randread [2007/03/02 02:32] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | # $EPIC: randread.txt,v 1.3 2007/03/02 02:32:04 jnelson Exp $ | ||
+ | ======Synopsis:====== | ||
+ | $__randread__(<filename>) | ||
+ | |||
+ | ======Technical:====== | ||
+ | The <filename> argument is a [[what is a word|dword]] which is different | ||
+ | from most function arguments. | ||
+ | |||
+ | This function reads a random line from the specified <filename>. | ||
+ | |||
+ | ======Practical:====== | ||
+ | This function has many novelty uses: random messages for /[[quit]], /[[kick]], | ||
+ | /[[part]], or /[[topic]]. | ||
+ | |||
+ | ======Returns:====== | ||
+ | The empty string is returned on error (the file does not exist, the file | ||
+ | is empty, or the file cannot be read). Otherwise, a random line from | ||
+ | the file is returned. | ||