eof

BAP Online Manuals : Library Reference : Library by Name : eof
Previous: enddraw
Next: error

6.2.44. eof

checks if the end of file is reached

SYNOPSIS

INCLUDE 'iolib.h'
eof(filehandle)

SYNTAX

eof(FileHandle) (i)

ARGUMENTS

handle(FileHandle) (i) FileHandle that determines the examined file

DESCRIPTION

Eof() succeeds if the end of the file refered to by FileHandle is reached.

EXAMPLE

openread(input,"test.dat",
repeat,
	readln(X),
	writeln(X),nl,	
	eof(input),
closefile(input).

ERRORS

A runtime error occurs if FileHandle is not valid.

LAYERS

prolog-process, client-server, object

RELATED PREDICATES

openread , readln


BAP Online Manuals : Library Reference : Library by Name : eof
Previous: enddraw
Next: error