Adding file reading line by line in nim
This commit is contained in:
parent
2b10336e6c
commit
a05e787132
|
@ -209,4 +209,9 @@ See [this](http://rosettacode.org/wiki/Abstract_type#Nim)
|
|||
var is_happy = if has_cat(): "quite" else: "not much"
|
||||
```
|
||||
|
||||
### Reading files line by line
|
||||
``` Nim
|
||||
for line in lines "yourfile.txt":
|
||||
echo line
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue