Macaulay2 » Documentation
Packages » Macaulay2Doc :: atEndOfFile(File)
next | previous | forward | backward | up | index | toc

atEndOfFile(File) -- test for end of file

Synopsis

Description

i1 : f = openInOut "!cat"

o1 = !cat

o1 : File
i2 : f << "hi there" << closeOut;
i3 : atEndOfFile f

o3 = false
i4 : peek read f

o4 = "hi there"
i5 : atEndOfFile f

o5 = false

Ways to use this method: