guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Trouble using hashq-get-handle in Guile


From: jamil egdemir
Subject: Re: Trouble using hashq-get-handle in Guile
Date: Sun, 7 Dec 2014 19:49:42 -0500

Mark,

> Based on a quick glance at the json code, I suspect you want this:
>
>   (hash-get-handle queryResults "documents")
>
> i.e. change 'hashq-get-handle' to 'hash-get-handle', and pass a string
> as the key, not a symbol.

BOOM!

scheme@(guile-user)> (hash-get-handle queryResults "documents")
$29 = ("documents" #<hash-table 297f820 17/31> #<hash-table 2982700
17/31> #<hash-table 29896a0 17/31> #<hash-table 298f640 17/31> #\
<hash-table 29915e0 17/31> #<hash-table 299d580 17/31> #<hash-table
29a1520 17/31> #<hash-table 29a34c0 17/31> #<hash-table 29a6460 \
17/31> #<hash-table 29f7400 17/31> #<hash-table 29fd3a0 17/31>
#<hash-table 2a08340 17/31> #<hash-table 2a1c2e0 17/31> #<hash-table \
2a4b280 17/31> #<hash-table 2a96220 17/31> #<hash-table 2aa31c0 17/31>
#<hash-table 2aa5160 17/31> #<hash-table 2aaa100 17/31> #<has\
h-table 2ab10a0 17/31> #<hash-table 2abb040 17/31> #<hash-table
2accfe0 17/31> #<hash-table 2acef80 17/31> #<hash-table 2ad1f20 17/3\
1> #<hash-table 2af1ec0 17/31> #<hash-table 2af4e60 17/31>)

All good now.

> If you use "~s" instead of "~a" in 'print-hash', it will be clear
> whether the keys are strings or symbols because strings will print
> within double quotes.

Excellent suggestion. I'll do that. Thanks to both you and ttn!

-j
-- 
-------------------------------------------------------------
Jamil Egdemir
address@hidden
http://www.power-quant.com
(631) 338-3170 (cell)
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]