const table support
This commit is contained in:
parent
ed887e67e9
commit
145fabeb67
16 changed files with 116 additions and 58 deletions
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
#
|
||||
# Nimrod's Runtime Library
|
||||
# (c) Copyright 2010 Andreas Rumpf
|
||||
# (c) Copyright 2011 Andreas Rumpf
|
||||
#
|
||||
# See the file "copying.txt", included in this
|
||||
# distribution, for details about the copyright.
|
||||
|
|
@ -210,7 +210,7 @@ proc `$`*(t: PStringTable): string {.rtl, extern: "nstDollar".} =
|
|||
result.add("}")
|
||||
|
||||
when isMainModule:
|
||||
var x = {"k": "v", "11": "22", "565": "67"}.newStringTable
|
||||
const x = {"k": "v", "11": "22", "565": "67"}.newStringTable
|
||||
assert x["k"] == "v"
|
||||
assert x["11"] == "22"
|
||||
assert x["565"] == "67"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue