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

20
tests/tconstr2.nim Executable file
View file

@ -0,0 +1,20 @@
# Test array, record constructors
type
TComplexRecord = record
s: string
x, y: int
z: float
chars: set[char]
const
things: array [0.., TComplexRecord] = [
(chars: {'a', 'b', 'c'}, s: "hi", x: 69, y: 45, z: 0.0),
(chars: {'a', 'b', 'c'}, s: "hi", x: 69, z: 0.3, y: 45)]
otherThings = [ # the same
(chars: {'a', 'b', 'c'}, s: "hi", x: 69, y: 45, z: 0.0),
(z: 0.0, chars: {'a', 'b', 'c'}, s: "hi", x: 69, y: 45)]
write(stdout, things[0].x)
#OUT 69