Sorry for being lazy earlier and for my poor English. What I meant was this:
import strutils
var
file = """
Hello,World
Key,Value
"""
for line in file.split("\n"): # iterator returns string
var data = line.split(",") # proc returns seq[string]
# but there is no version of split you can use as "for myKey, myValue in"
if data.len() == 2:
echo data[0]," = ", data[1]
Run
- Newbie question: Why am I getting the too many variables error ... freeflow
- Re: Newbie question: Why am I getting the too many variabl... sky_khan
- Re: Newbie question: Why am I getting the too many var... SolitudeSF
- Re: Newbie question: Why am I getting the too many... freeflow
- Re: Newbie question: Why am I getting the too ... SolitudeSF
- Re: Newbie question: Why am I getting the... sky_khan
