Avoids temporal string in tables hashing example.

This commit is contained in:
Grzegorz Adam Hankiewicz
2014-06-06 19:53:39 +02:00
parent 7da3c5e71e
commit 9009841d62

View File

@@ -37,7 +37,8 @@
## ## Piggyback on the already available string hash proc.
## ##
## ## Without this proc nothing works!
## result = hash(x.firstName & x.lastName)
## result = x.firstName.hash !& x.lastName.hash
## result = !$result
##
## var
## salaries = initTable[Person, int]()
@@ -841,7 +842,8 @@ when isMainModule:
## Piggyback on the already available string hash proc.
##
## Without this proc nothing works!
result = hash(x.firstName & x.lastName)
result = x.firstName.hash !& x.lastName.hash
result = !$result
var
salaries = initTable[Person, int]()