summary refs log tree commit diff stats
path: root/tests/misc/tstrdesc.nim
blob: d23160315848c252629a13e672abe38f2659822a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var
  x: array [0..2, int]

x = [0, 1, 2]

type
  TStringDesc {.final.} = object
    len, space: int # len and space without counting the terminating zero
    data: array [0..0, char] # for the '\0' character

var
  emptyString {.exportc: "emptyString".}: TStringDesc
span class="w"> float] = [3.0, 1.2, 3.0] v2: array[0..1, float] = [2.0, 1.0] v3 = v1 + v2