Anonymous user
Read entire file: Difference between revisions
added Oz
m (→[[Read_entire_file#ALGOL 68]]: detail ''new line'' and ''new page'' routines) |
(added Oz) |
||
Line 81:
}
}</lang>
=={{header|Oz}}==
The interface for file operations is object-oriented.
<lang oz>declare
FileHandle = {New Open.file init(name:"test.txt")}
FileContents = {FileHandle read(size:all list:$)}
in
{FileHandle close}
{System.printInfo FileContents}</lang>
<code>FileContents</code> is a list of bytes. The operation does not assume any particular encoding.
=={{header|Perl}}==
|