Files
BlitzNext/_release/help/commands/2d_commands/EOF.htm
T

55 lines
1.5 KiB
HTML
Raw Normal View History

2014-12-08 12:43:20 +13:00
<html>
<head>
<title>Blitz3D Docs</title>
<link rel=stylesheet href=../css/commands.css type=text/css>
</head>
<body>
<h1>Eof (filehandle/stream)</h1>
<h1>Parameters</h1>
<table>
<tr>
<td>
filehandle/stream = a valid variable set with the OpenFile, ReadFile command, or OpenTCPStream (v1.52+)
</td>
</tr>
</table>
<h1>Description</h1>
<table>
<tr>
<td>
Checks to see if the End of File of an opened file or stream has been reached. Use this to determine if you should continue to pull more information from a file/stream or not. Use this to read a text file of unknown length (say a README.TXT) and display it. See example.
<br />
<br />
Eof returns 1 if eof has been reached or, in the case of a TCP stream, the stream has been 'nicely' closed.
<br />
<br />
Eof returns -1 if something has gone wrong during stream processing.
<br />
<br />
Streams can only be used in Blitz Basic v1.52 or greater.
</td>
</tr>
</table>
<h1><a href=../2d_examples/Eof.bb>Example</a></h1>
<table>
<tr>
<td>
; Eof sample
<br />
<br />
file$="c:autoexec.bat"
<br />
2014-02-26 16:08:39 +13:00
<br />
2014-12-08 12:43:20 +13:00
filein = ReadFile(file$)
2014-02-26 16:08:39 +13:00
<br />
2014-12-08 12:43:20 +13:00
2014-02-26 16:08:39 +13:00
<br />