version0.7.10

This commit is contained in:
Andreas Rumpf 2009-06-08 08:13:09 +02:00
commit 36818817bd
14 changed files with 1011 additions and 0 deletions

22
tests/tident.nim Normal file
View file

@ -0,0 +1,22 @@
type
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
s*: string
proc myNewString(L: int): string {.inline.} =
result = newString(L)
if result.len == L: echo("Length correct")
else: echo("bug")
for i in 0..L-1:
if result[i] == '\0':
echo("Correct")
else:
echo("Wrong")
var s = myNewString(8)