proc parseStringSeq*(text: string, charset: CHARSET): CHARSEQ = var osq: CHARSEQ = @[] for i in countup(0, text.len - 1): if text[i].isAlphaAscii(): osq.add(charset[int(text[i]) - 63]) #alphabets(capital) elif text[i].isDigit(): osq.add(charset[int(text[i]) - 2]) #digits else: discard return osq Run
This is a shoddy proc for taking a string and converting into other type char by char. And when I try to run it it says `cannot evaluate at compile time: text`. If i replace string with static[string], it says `cannot evaluate at compile time: i`. I have a hard time understanding why this error happens.