PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/examples/readline.winxed

http://github.com/NotFound/winxed
Unknown | 19 lines | 18 code | 1 blank | 0 comment | 0 complexity | d8754e5b5f5dc08d7fe07716ee7ea561 MD5 | raw file
 1function main(var args)
 2{
 3	string filename = 'README';
 4	var file = new 'FileHandle';
 5	if (args > 1)
 6		filename= args[1];
 7	say ("File: ", filename);
 8	file.open(filename);
 9
10	for (;;)
11	{
12		var s= file.readline();
13		if (file.eof() )
14			break;
15		print('>> ', s);
16	}
17	say("(End of file)");
18	file.close();
19}