4

If I run nim c -r test.nim the following code in Nim

echo "Hi"

It would print the result with additional information

$ nim c -r test.nim 
Hint: used config file '/usr/local/Cellar/nim/1.2.6/nim/config/nim.cfg' [Conf]
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: test [Processing]
CC: stdlib_system.nim
CC: test.nim
Hint:  [Link]
Hint: 14204 LOC; 0.898 sec; 18.598MiB peakmem; Debug build; proj: /Users/alex/tmp/nim/test.nim; out: /Users/alex/tmp/nim/test [SuccessX]
Hint: /Users/alex/tmp/nim/test
Hi

Is there a way to tell it to print only the result, the

Hi
Alex Craft
  • 13,598
  • 11
  • 69
  • 133

1 Answers1

5

You can use the --hints:on|off|list option:

nim c -r --hints:off test.nim

Note that warnings and errors will still be reported when hints are turned off. You can turn off warnings too with --warnings:on|off|list. These and other compiler switches are described here.

ad absurdum
  • 19,498
  • 5
  • 37
  • 60