next up previous contents index
Next: fileAppend,fileBinary,fileRead,fileText,fileWrite Up: File Previous: close!   Contents   Index


coerce


Usage

f::BinaryReader
f::BinaryWriter
f::TextReader
f::TextWriter


Signatures

coerce: % $\to$ BinaryReader
coerce: % $\to$ BinaryWriter
coerce: % $\to$ TextReader
coerce: % $\to$ TextWriter


Parameter Type Description
f % a file


Description

Converts the file f to to a binary or text reader or writer. This is necessary before reading from or writing to the file. The file must have been opened in an appropriate mode for reading or writing respectively.


Remarks

Coercing a file to a reader or writer allocates memory, so it is advisable to assign the resulting stream to a variable. Unlike the ones for String, those coercions do not reset the file to its beginning.



Manuel Bronstein 2004-06-28