tcmdline.nim 329 B

12345678910111213141516171819
  1. discard """
  2. outputsub: "Number of parameters: 0"
  3. joinable: false
  4. """
  5. # Test the command line
  6. import
  7. os, strutils
  8. var
  9. i: int
  10. params = paramCount()
  11. i = 0
  12. writeLine(stdout, "This exe: " & getAppFilename())
  13. writeLine(stdout, "Number of parameters: " & $params)
  14. while i <= params:
  15. writeLine(stdout, paramStr(i))
  16. i = i + 1