summary refs log blame commit diff stats
path: root/tests/accept/compile/tstrtabs.nim
blob: 299db609db2a33d981dd1da5a327cd33ca0491e0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                     
import strtabs

var tab = newStringTable(["key1", "val1", "key2", "val2"], 
                         modeStyleInsensitive)
for i in 0..80:
  tab["key_" & $i] = "value" & $i
  
for key, val in pairs(tab):
  writeln(stdout, key, ": ", val)
writeln(stdout, "length of table ", $tab.len)

writeln(stdout, `%`("$key1 = $key2; ${PATH}", tab, {useEnvironment}))