cannot evaluate at compile time

2024-05-06 Thread anter003
doesn't tuple also support numeric index?

cannot evaluate at compile time

2024-05-06 Thread anter003
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():

get object field by variable

2024-05-06 Thread anter003
I'm just using tuple with numerical index now. Thanks for everyone who helped.

get object field by variable

2024-05-05 Thread anter003
Can I get object's field value by variable? In javascript I can do something like this: var obj = { a: 10, b: 20 } var c = "a" console.log(obj[c]) Run