tvardecl.nim 273 B

1234567891011121314151617181920
  1. discard """
  2. output: "44"
  3. """
  4. # Test the new variable declaration syntax
  5. import std/sequtils
  6. var
  7. x = 0
  8. s = "Hallo"
  9. a, b: int = 4
  10. write(stdout, a)
  11. writeLine(stdout, b) #OUT 44
  12. proc p() = # bug #18104
  13. var x, y = newSeqWith(10, newString(3))
  14. discard (x, y)
  15. p()