seqlua
changeset 11:814d42156b14
Extended README to contain example for file:lines() iterator
author | jbe |
---|---|
date | Wed Aug 20 04:54:49 2014 +0200 (2014-08-20) |
parents | bb2cf91174ac |
children | 91b0d0d4c4dd |
files | README |
line diff
1.1 --- a/README Wed Aug 20 04:47:50 2014 +0200 1.2 +++ b/README Wed Aug 20 04:54:49 2014 +0200 1.3 @@ -147,7 +147,11 @@ 1.4 return 0; 1.5 } 1.6 1.7 - printcsv{"a", "b", "c"} -- prints: a,b,c 1.8 + printcsv{"a", "b", "c"} 1.9 + -- prints: a,b,c 1.10 + 1.11 + printcsv(assert(io.open("testfile")):lines()) 1.12 + -- prints: line1,line2,... of "testfile" 1.13 1.14 NOTE: ``seqlua_iterinit`` will store one extra element on the stack during 1.15 iteration. When ``seqlua_iternext`` returns 0, this extra element is popped