<head><title>ColdC: Function/Method Reference: fread()</title></head> <body> <h1 align=center><a href="/ColdC/">ColdC</a>: <a href="/ColdC/Functions/">Function/Method Reference</a>: fread()</h1> <hr> <p> <font size=+1><i>STRING|BUFFER</i> <b>fread</b>(<i>[INTEGER <b>block</b>]</i>)</font> <p>Read from the existing file bound to this object. If the file is a binary file, a buffer is returned. If the file is a text file (default), a string is returned. <p>If the file is at the end, the <code>~eof</code> error is thrown. <p>With binary files an optional block size may be specified. The default block size is 512 characters. <p>Example: <blockquote><pre> while ((line = (| fread() |)) != ~eof) log(line); </blockquote></pre> <p><hr size=4><p align=center><i>Last Modified on Mar 2 1996</i> <br><i>Copyright © 1995, 1996, Brandon Gillespie</i> </body>