/examples/readline.winxed
http://github.com/NotFound/winxed · Unknown · 19 lines · 18 code · 1 blank · 0 comment · 0 complexity · d8754e5b5f5dc08d7fe07716ee7ea561 MD5 · raw file
- function main(var args)
- {
- string filename = 'README';
- var file = new 'FileHandle';
- if (args > 1)
- filename= args[1];
- say ("File: ", filename);
- file.open(filename);
- for (;;)
- {
- var s= file.readline();
- if (file.eof() )
- break;
- print('>> ', s);
- }
- say("(End of file)");
- file.close();
- }