Merge pull request #1075 from flaviut/inlinedocs
Add some documentations and code examples in system
This commit is contained in:
commit
a690e7b267
71 changed files with 2521 additions and 15 deletions
16
tests/misc/tdllvar.nim
Normal file
16
tests/misc/tdllvar.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import os
|
||||
|
||||
proc getDllName: string =
|
||||
result = "mylib.dll"
|
||||
if ExistsFile(result): return
|
||||
result = "mylib2.dll"
|
||||
if ExistsFile(result): return
|
||||
quit("could not load dynamic library")
|
||||
|
||||
proc myImport(s: cstring) {.cdecl, importc, dynlib: getDllName().}
|
||||
proc myImport2(s: int) {.cdecl, importc, dynlib: getDllName().}
|
||||
|
||||
myImport("test2")
|
||||
myImport2(12)
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue