I'm starting to code in Nimrod and I'm beginning with easy things. The usual "guess the number between 1 and 100".
How can I convert a string to an int? In some source code I see parseInt(num) but...
import parseutils
var num = parseInt("10")
foo.nim(4, 19) Error: type mismatch: got (string) but expected one of: parseInt(s: string, number: var int, start: int): int
This works
var str = "10"
discard parseInt("10", num)
But, really? I have to write all of that to convert a string to an int? Or is there a shorter way I'm missing?
The documentation is nice but it's not sorted, so it's hard to find anything there...
Thanks!