Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

file 23 lines (22 sloc) 0.319 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
function read(var filename)
{
var file = new 'FileHandle';
say ("File: ", filename);
file.open(filename);
next:
var s= file.readline();
yield s;
goto next;
}

function main()
{
string filename = 'README';
var s= read(filename);
say(s);
while (s)
{
print('>> ', s);
s= read();
}
say("(End of file)");
}
Something went wrong with that request. Please try again.