version 0.7.8
This commit is contained in:
parent
08bc9ac03c
commit
db4f617afc
92 changed files with 3088 additions and 3477 deletions
8
tests/csvtest.csv
Normal file
8
tests/csvtest.csv
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
headerField1,headerField2,headerField3
|
||||
12,12132,"hallo ""
|
||||
du"
|
||||
1,,
|
||||
,2,
|
||||
,,3
|
||||
1,2,3
|
||||
|
||||
|
6
tests/data.csv
Normal file
6
tests/data.csv
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Algo_A; Algo_B; Algo_C
|
||||
12; 12; 16
|
||||
2; 5; 9
|
||||
63; 65.3; 90
|
||||
0; 1.2; 3
|
||||
|
||||
|
|
|
@ -28,6 +28,16 @@ type
|
|||
of nkList: sons: seq[PCaseNode]
|
||||
else: unused: seq[string]
|
||||
|
||||
TIdObj* = object of TObject
|
||||
id*: int # unique id; use this for comparisons and not the pointers
|
||||
|
||||
PIdObj* = ref TIdObj
|
||||
PIdent* = ref TIdent
|
||||
TIdent*{.acyclic.} = object of TIdObj
|
||||
s*: string
|
||||
next*: PIdent # for hash-table chaining
|
||||
h*: int # hash value of s
|
||||
|
||||
var
|
||||
flip: int
|
||||
|
||||
|
|
@ -134,7 +144,17 @@ proc buildBTree(father: var TBNode) =
|
|||
father.t.data = @["ha", "lets", "stress", "it"]
|
||||
setSons(father)
|
||||
|
||||
proc getIdent(identifier: cstring, length: int, h: int): PIdent =
|
||||
new(result)
|
||||
result.h = h
|
||||
result.s = newString(length)
|
||||
|
||||
proc main() =
|
||||
discard getIdent("addr", 4, 0)
|
||||
discard getIdent("hall", 4, 0)
|
||||
discard getIdent("echo", 4, 0)
|
||||
discard getIdent("huch", 4, 0)
|
||||
|
||||
var
|
||||
father: TBNode
|
||||
for i in 1..1_00:
|
||||
|
|
@ -156,9 +176,6 @@ proc main() =
|
|||
writeln(stdout, s[89])
|
||||
write(stdout, "done!\n")
|
||||
|
||||
#main()
|
||||
|
||||
#GC_disable()
|
||||
var
|
||||
father: TBNode
|
||||
s: string
|
||||
|
|
@ -177,4 +194,4 @@ main()
|
|||
write(stdout, "finished\n")
|
||||
GC_fullCollect()
|
||||
GC_fullCollect()
|
||||
write(stdout, GC_getStatistics())
|
||||
writeln(stdout, GC_getStatistics())
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ proc init(my: var TRectangle) =
|
|||
my.height = 10
|
||||
my.draw = drawRectangle
|
||||
|
||||
macro `!` (n: expr): expr =
|
||||
macro `!` (n: expr): stmt =
|
||||
result = newNimNode(nnkCall, n)
|
||||
var dot = newNimNode(nnkDotExpr, n)
|
||||
dot.add(n[1]) # obj
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue