concats.nim 396 B

123456789101112131415161718192021222324252627
  1. discard """
  2. cmd: "$nim c --gc:regions -d:nimTypeNames -r $file"
  3. output: "Success"
  4. """
  5. var s: seq[int] = @[]
  6. var inner: MemRegion
  7. include system/ansi_c
  8. #echo @[1, 20]
  9. echo @[1000, 100]
  10. when false:
  11. #withRegion(inner):
  12. withScratchRegion:
  13. for x in 0..1_000:
  14. let g = "bar"
  15. let f = substr("foo ") & g & $x
  16. echo f # & " stuff"
  17. s.add(x)
  18. echo s
  19. echo "Success"