Hi guys,
till nim-1.4.8 I can "wrao a c #define" like in the expample below without problems:
{.emit: """ #define SQR(x) ((x)*(x)) """.} proc SQR(x: int32): int32 {.importc, noDecl.} echo ("Number: " & {SQR(10)}).fmt
Since nim-1.6.0 I get the following error now: Error: type mismatch: got <string, set[range 0..65535(int)]>
Please can someone explain me, what is the new wrapping strategy now for constructs like these?
Cheers, Marc
There error is from "Number: " & {SQR10}.
I think you meant to write fmt"Number: {SQR(10)}"
Thanks for your hint, ynfle!
Curious enough that the former syntax also worked before 1.6.0 ...