Last active
September 23, 2016 08:56
-
-
Save stisa/deb4d14f3a7ac769224483f97bb04ce6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## first.nim ### | |
| proc test*(): string = "test1" | |
| echo test() | |
| ## second.nim ### | |
| from first import test | |
| proc test2*(): string = "test2" | |
| echo test2() | |
| # nim c -r second.nim | |
| # Outputs: | |
| # test1 | |
| # test2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use
when isMainModuleto avoid the imported module from outputing