exprs for dynlib; indentation parsing
This commit is contained in:
parent
7063670a2c
commit
10ab814fba
6 changed files with 119 additions and 67 deletions
16
tests/tdllvar.nim
Executable file
16
tests/tdllvar.nim
Executable 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)
|
||||
|
||||
|
||||
24
tests/tindent1.nim
Executable file
24
tests/tindent1.nim
Executable file
|
|
@ -0,0 +1,24 @@
|
|||
|
||||
const romanNumbers1 =
|
||||
[
|
||||
("M", 1000), ("D", 500), ("C", 100),
|
||||
("L", 50), ("X", 10), ("V", 5), ("I", 1) ]
|
||||
|
||||
const romanNumbers2 =
|
||||
[
|
||||
("M", 1000), ("D", 500), ("C", 100),
|
||||
("L", 50), ("X", 10), ("V", 5), ("I", 1)
|
||||
]
|
||||
|
||||
const romanNumbers3 =
|
||||
[
|
||||
("M", 1000), ("D", 500), ("C", 100),
|
||||
("L", 50), ("X", 10), ("V", 5), ("I", 1)
|
||||
]
|
||||
|
||||
const romanNumbers4 = [
|
||||
("M", 1000), ("D", 500), ("C", 100),
|
||||
("L", 50), ("X", 10), ("V", 5), ("I", 1)
|
||||
]
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue