fakedeps.nim 409 B

12345678910111213141516171819
  1. import strutils, os, pegs, strtabs, math, threadpool, times
  2. proc fakeCppDep(x: ptr float) {.importcpp: "fakeCppDep", header: "<vector>".}
  3. proc fakeTimeDep() = echo(times.getDateStr())
  4. proc fakedeps() =
  5. var x = 0.4
  6. {.emit: "#if 0\n".}
  7. fakeCppDep(addr x)
  8. {.emit: "#endif\n".}
  9. # this is not true:
  10. if math.sin(x) > 0.6:
  11. spawn(fakeTimeDep())
  12. proc main =
  13. fakedeps()
  14. when isMainModule:
  15. main()