fork download
  1. proc countupto(a, b: int): int =
  2. var res = a - 1
  3. while res <= b + 1:
  4. inc(res)
  5. return res
  6.  
  7. for i in countupto(1,9):
  8. echo i
Compilation error #stdin compilation error #stdout 0s 2432KB
stdin
Standard input is empty
compilation info
prog.nim(7, 19) Error: type mismatch: got (int)
but expected one of: 
system.items(a: array[IX, T])
system.items(a: seq[T])
system.items(E: typedesc[enum])
system.items(a: string)
system.items(a: openarray[T])
system.items(s: Slice[items.T])
system.items(a: cstring)
system.items(a: set[T])

stdout
Standard output is empty