Initial import

This commit is contained in:
Andreas Rumpf 2008-06-22 16:14:11 +02:00
commit 405b86068e
324 changed files with 163599 additions and 0 deletions

34
tests/trepr.nim Executable file
View file

@ -0,0 +1,34 @@
# test the new "repr" built-in proc
import
io
type
TPoint = record
x, y, z: int
s: array [0..1, string]
TEnum = enum
en1, en2, en3, en4, en5, en6
var
p: TPoint
q: ref TPoint
s: seq[ref TPoint]
p.x = 0
p.y = 13
p.z = 45
p.s[0] = "abc"
p.s[1] = "xyz"
new(q)
q^ = p
s = [q, q, q, q]
writeln(stdout, repr(p))
writeln(stdout, repr(q))
writeln(stdout, repr(s))
writeln(stdout, repr(nil))
writeln(stdout, repr(en4))