Files
Nim/tests/misc/temit.nim
Andreas Rumpf a690e7b267 Merge pull request #1075 from flaviut/inlinedocs
Add some documentations and code examples in system
2014-04-09 22:56:18 +02:00

21 lines
252 B
Nim

discard """
file: "temit.nim"
output: "509"
"""
# Test the new ``emit`` pragma:
{.emit: """
static int cvariable = 420;
""".}
proc embedsC() =
var nimrodVar = 89
{.emit: """printf("%d\n", cvariable + (int)`nimrodVar`);""".}
embedsC()