#calculator.nim file {.compile: "logic.c".} proc addTwoIntegers(a, b: cint):
cint {.importc.}
when isMainModule:
echo addTwoIntegers(3, 7)
* * *
#logic.c file int addTwoIntegers(int a, int b)
{
return a + b;
}
#calculator.nim file {.compile: "logic.c".} proc addTwoIntegers(a, b: cint):
cint {.importc.}
when isMainModule:
echo addTwoIntegers(3, 7)
* * *
#logic.c file int addTwoIntegers(int a, int b)
{
return a + b;
}